Skip to content

Omit computing max score when sorting by score primarily in TopGroupsCollector - #16569

Open
gaobinlong wants to merge 2 commits into
apache:mainfrom
gaobinlong:omitMaxScore
Open

Omit computing max score when sorting by score primarily in TopGroupsCollector#16569
gaobinlong wants to merge 2 commits into
apache:mainfrom
gaobinlong:omitMaxScore

Conversation

@gaobinlong

Copy link
Copy Markdown
Contributor

Description

In TopGroupsCollector, omit MaxScoreCollector when withinGroupSort has score as the primary field. The group max score is instead derived from FieldDoc.fields[0] (set by RelevanceComparator), avoiding the overhead of a parallel score-tracking collector.

This helps improve the performance of grouping search, benchmark on wikimedium1m:

                        TaskQPS baseline      StdDevQPS my_modified_version      StdDev                Pct diff p-value
                TermGroup10K      124.24     (12.3%)      126.94     (11.5%)    2.2% ( -19% -   29%) 0.480
                TermGroup100      117.89     (31.3%)      120.88     (26.7%)    2.5% ( -42% -   88%) 0.736
                 TermGroup1M      118.59     (10.9%)      122.83     (13.8%)    3.6% ( -19% -   31%) 0.265

…Collector

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
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.

1 participant