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

Remove useless abstractions in DocValues-based queries #12127

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

rmuir
Copy link
Member

@rmuir rmuir commented Feb 4, 2023

There's no need to make things abstract: DocValues does the right thing Optimizing for where no docs for the field in the segment exist is easy, simple null check (replacing the existing one!)

There's no need to make things abstract: DocValues does the right thing
Optimizing for where no docs for the field in the segment exist is easy, simple null check (replacing the existing one!)
@rmuir
Copy link
Member Author

rmuir commented Feb 4, 2023

one nice benefit is, not all of these N-subclasses were checking for the case where field doesn't exist in segment and optimizing it by returning null Scorer, now the case is always optimized.

Copy link
Contributor

@gsmiller gsmiller left a comment

Choose a reason for hiding this comment

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

LGTM

@rmuir rmuir merged commit a6bceb7 into apache:main Feb 6, 2023
@rmuir rmuir added this to the 9.6.0 milestone Feb 6, 2023
asfgit pushed a commit that referenced this pull request Feb 6, 2023
There's no need to make things abstract: DocValues does the right thing
Optimizing for where no docs for the field in the segment exist is easy, simple null check (replacing the existing one!)
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.

2 participants