Skip to content

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

Merged
jainankitk merged 4 commits intoapache:mainfrom
gaobinlong:maxScoreBugFix
Apr 29, 2026
Merged

Fix TopGroupsCollector#getTopGroups() returning NaN maxScore when a group has no hits#15873
jainankitk merged 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
Copy link
Copy Markdown
Contributor

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

@jainankitk jainankitk merged commit 23d400c into apache:main Apr 29, 2026
13 checks passed
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

2 participants