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 NPE in PinnedQuery call to DisjunctionMaxScorer. #51047

Merged
merged 2 commits into from
Jan 15, 2020

Conversation

markharwood
Copy link
Contributor

@markharwood markharwood commented Jan 15, 2020

The DisjunctionMaxScorer will throw a NullPointerException if advanceShallow is called and scoreMode != ScoreMode.TOP_SCORES.
Added code in the calling CappedScoreQuery to avoid making this call when not in the required score mode and test to reproduce the issue.

@markharwood markharwood added >bug :Search/Search Search-related issues that do not fall into other categories labels Jan 15, 2020
@markharwood markharwood self-assigned this Jan 15, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@markharwood markharwood merged commit f74e8ae into elastic:master Jan 15, 2020
markharwood added a commit to markharwood/elasticsearch that referenced this pull request Jan 16, 2020
Fix NPE in PinnedQuery call to DisjunctionMaxScorer.
Added test and fix that tests for score type.
Closes elastic#51034
markharwood added a commit that referenced this pull request Jan 16, 2020
Fix NPE in PinnedQuery call to DisjunctionMaxScorer. (#51047)
Added test and fix that tests for score type.
Closes #51034
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
Fix NPE in PinnedQuery call to DisjunctionMaxScorer.
Added test and fix that tests for score type.
Closes elastic#51034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants