gaobinlong opened a new pull request, #15494: URL: https://github.com/apache/lucene/pull/15494
Similar to [TopScoreDocCollector](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/TopScoreDocCollector.java#L38), in FirstPassGroupingCollector, if the primary sort is _score, we can propagate the minimum competitive score to the scorer when the orderedGroups is full, this can improve the grouping performance by 20%, below are the benchmark result: query DSL in OpenSearch: ``` GET big5/_search { "query": { "match": { "message": "50-136-239-27" } }, "collapse": { "field": "host.name" } } ``` test result: ``` Before: | 50th percentile service time | collapsing | 426.714 | ms | | 90th percentile service time | collapsing | 438.719 | ms | | 99th percentile service time | collapsing | 465.926 | ms | | 99.9th percentile service time | collapsing | 496.134 | ms | | 100th percentile service time | collapsing | 515.556 | ms | After: | 50th percentile service time | collapsing | 353.501 | ms | | 90th percentile service time | collapsing | 358.511 | ms | | 99th percentile service time | collapsing | 379.314 | ms | | 99.9th percentile service time | collapsing | 398.28 | ms | | 100th percentile service time | collapsing | 476.743 | ms | ``` Related to https://github.com/apache/lucene/issues/15178. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
