Skip to content

Fix TopGroupsCollector#getTopGroups() returning NaN maxScore when a group has no hits#15873

Open
gaobinlong wants to merge 4 commits intoapache:mainfrom
gaobinlong:maxScoreBugFix
Open

Fix TopGroupsCollector#getTopGroups() returning NaN maxScore when a group has no hits#15873
gaobinlong wants to merge 4 commits intoapache:mainfrom
gaobinlong:maxScoreBugFix

Conversation

@gaobinlong
Copy link
Copy Markdown
Contributor

Description

Fixes #15872, use nonNANmax() instead of Math.max() in TopGroupsCollector#getTopGroups() to avoid generating wrong NaN maxScore in the final TopGroups result.

…roup has no hits

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions github-actions bot added this to the 10.5.0 milestone Mar 25, 2026
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@gaobinlong
Copy link
Copy Markdown
Contributor Author

Hi @dweiss , could you help to review this PR? Thank you~

@github-actions
Copy link
Copy Markdown
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Apr 10, 2026
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.

TopGroupsCollector#getTopGroups() returns NaN maxScore when no hits for a group value

1 participant