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

LUCENE-10106: Sort optimization wrongly skip first docs #300

Merged
merged 2 commits into from Sep 15, 2021

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Sep 15, 2021

The first documents of subsequent segments are mistakenly skipped when sort optimization is enabled. We should initialize maxDocVisited in NumericComparator to -1 instead of 0.

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice find @dnhatn

dir.close();
}

public void testRandomLong() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great test!

Copy link
Contributor

@mayya-sharipova mayya-sharipova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dnhatn Thanks so much for fixing this bug, really appreciate!

We also should fix this bug on https://github.com/apache/lucene-solr branch 8.x.

Also would be good to fix it on 8.10 if not so late.

@dnhatn dnhatn merged commit b7a286d into apache:main Sep 15, 2021
@dnhatn
Copy link
Member Author

dnhatn commented Sep 15, 2021

@romseygeek @mayya-sharipova Thanks for review.

We also should fix this bug on https://github.com/apache/lucene-solr branch 8.x.
Also would be good to fix it on 8.10 if not so late.

Sure, I will do it.

@dnhatn dnhatn deleted the fix-sort-optimization branch September 15, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants