Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameter value for calling data.advanceExact #44205

Merged
merged 2 commits into from
Jul 18, 2019

Conversation

maarab7
Copy link
Contributor

@maarab7 maarab7 commented Jul 11, 2019

While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.
@javanna
Copy link
Member

javanna commented Jul 15, 2019

thanks @maarab7 for your contribution! Could you please sign our CLA so we can review it and merge it?

@javanna javanna added the :Search/Ranking Scoring, rescoring, rank evaluation. label Jul 15, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@maarab7
Copy link
Contributor Author

maarab7 commented Jul 15, 2019

I have already signed it and have the signed document downloaded. Is there an approval that happens?

@javanna
Copy link
Member

javanna commented Jul 15, 2019

heya @maarab7 have you maybe signed the CLA with an email that differs from the one you have on your github profile? That would explain why the check is not green. I can see your signature though.

@maarab7
Copy link
Contributor Author

maarab7 commented Jul 16, 2019

I don't think I would have used different emails. Cannot verify it though since there is not email on the signature and I've not received any email either. I have the setting 'Keep my email address private' on though. Would that be causing the issue? If not, would you suggest me signing the contract again making sure it is with the same email address as that of github?

@javanna
Copy link
Member

javanna commented Jul 17, 2019

test this please

@javanna
Copy link
Member

javanna commented Jul 17, 2019

@elasticmachine update branch

@javanna
Copy link
Member

javanna commented Jul 17, 2019

retest this please

@javanna javanna merged commit aff21c4 into elastic:master Jul 18, 2019
@javanna
Copy link
Member

javanna commented Jul 18, 2019

thanks @maarab7 , merged!

@javanna javanna added the v6.8.2 label Jul 18, 2019
javanna pushed a commit that referenced this pull request Jul 18, 2019
While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.
javanna pushed a commit that referenced this pull request Jul 18, 2019
While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.
javanna pushed a commit that referenced this pull request Jul 18, 2019
While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.
javanna pushed a commit that referenced this pull request Jul 18, 2019
While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.
javanna pushed a commit that referenced this pull request Jul 18, 2019
While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.
javanna pushed a commit that referenced this pull request Jul 18, 2019
While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.
@jpountz jpountz added the v7.3.0 label Jul 26, 2019
@jpountz jpountz removed the v7.3.1 label Jul 26, 2019
polyfractal pushed a commit to polyfractal/elasticsearch that referenced this pull request Jul 29, 2019
While the code works perfectly well for a single segment, it returns the wrong values for multiple segments. E.g. If we have 500 docs in one segment and if we want to get the doc id = 280 then data.advanceExact(topDocs.scoreDocs[i].doc) works fine. If we have two segments, say, with first segment having docs 1-200 and the second segment having docs 201-500, then 280 is fetched from the second segment but is actually 480. Subtracting the docBase (280-200) takes us to the correct document which is 80 in the second segment and actually 280.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants