Skip to content

SOLR-18181: ValueSourceAugmenter NPE when rows exceed 1000 and scores requested#4314

Open
mlbiscoc wants to merge 2 commits intoapache:branch_9xfrom
mlbiscoc:SOLR-18181-npe
Open

SOLR-18181: ValueSourceAugmenter NPE when rows exceed 1000 and scores requested#4314
mlbiscoc wants to merge 2 commits intoapache:branch_9xfrom
mlbiscoc:SOLR-18181-npe

Conversation

@mlbiscoc
Copy link
Copy Markdown
Contributor

Trying to send a query with ValueSourceAugmenter that requested score and > 1000 rows resulted in an NPE. This is because when it passes prefetch limit and tries to retrieve score, it was referenced incorrectly.

ValueSourceAugmenter was overriding a deprecated 2-arg method which didn't have access to score. The method then incorrectly tried to get score via (float) doc.get("score")

To fix, we override the non-deprecated method instead which actually has DocIterationInfo to get the score.

Copy link
Copy Markdown
Contributor

@HoustonPutman HoustonPutman left a comment

Choose a reason for hiding this comment

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

Looks good, the change is already there in 10x, so this is just bringing 9x more in-line.

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.

2 participants