[
https://issues.apache.org/jira/browse/LUCENE-8956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913694#comment-16913694
]
Adrien Grand commented on LUCENE-8956:
--------------------------------------
The changes in src/java look good to me. Maybe we could make the test a bit
better:
- The name is a bit vague, as there could be lots of different optimizations
in the rescoring logic. Maybe call it "testRescoreSubsetOfHits" or something
along those lines?
- Currently the test only checks that the correct number of hits is returned,
we should also check that we got the right hits?
Some minor comments:
- No need for a BooleanQuery in the test since you are adding a single clause.
Or did you plan to add wordTwo in another clause?
- I can't check right now but I think randomizedtesting already has a utility
class called RandomPicks to help pick a random element from a list.
> QueryRescorer sort optimization
> -------------------------------
>
> Key: LUCENE-8956
> URL: https://issues.apache.org/jira/browse/LUCENE-8956
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/query/scoring
> Reporter: Paul Sanwald
> Priority: Minor
> Attachments: LUCENE-8956.patch
>
>
> This patch addresses a TODO in QueryRescorer: We should not sort the full
> array of the results returned from rescoring, but rather only topN, when topN
> is less than total hits.
>
> Made this optimization with some suggestions from [~jpountz] and [~jimczi],
> this is my first lucene patch submission.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]