[
https://issues.apache.org/jira/browse/SOLR-15869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17464669#comment-17464669
]
Christine Poerschke commented on SOLR-15869:
--------------------------------------------
Hi [~abenedetti], I was seeing addition of the test coverage as a way to model
the existing behaviour of the code, if we "keep" the code in question then the
test coverage models the behaviour which some custom code (which we don't know
of) gets currently and if we "not keep" the code then the test coverage
"breaks" and needs adjusting to model the revised behaviour. So in either
scenario the test addition seems useful.
Have just created SOLR-15873 for the "keep" or "not keep" discussion, and any
"not keep" code changes if not keeping. Did not see your update here earlier
today, sorry.
> expand LTRRescorer.rescore test coverage
> ----------------------------------------
>
> Key: SOLR-15869
> URL: https://issues.apache.org/jira/browse/SOLR-15869
> Project: Solr
> Issue Type: Test
> Components: contrib - LTR
> Reporter: Christine Poerschke
> Assignee: Christine Poerschke
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> On the dev mailing list
> https://lists.apache.org/thread/113d1yzty5ryvyt2o9msfytldv41qpgq thread
> [~4nn4r] shared about the discovery of the
> {{org.apache.solr.ltr.LTRRescorer#scoreSingleHit}} code block and how
> {{hitUpto >= topN}} never arises. I agree that the condition currently never
> evaluates to true due to how the rescore method is called:
> * The Solr {{ReRankCollector}} caps the number of documents that are passed
> to the {{rescore}} method:
> https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.11.1/solr/core/src/java/org/apache/solr/search/ReRankCollector.java#L112-L119
> * The Lucene {{Rescorer}} API however describes topN as the number of hits to
> return i.e. it is possible for firstPassTopDocs to contain more than topN
> documents:
> https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.11.1/lucene/core/src/java/org/apache/lucene/search/Rescorer.java#L51
> This ticket here proposes to expand {{LTRRescorer.rescore}} test coverage to
> include the "more than topN documents are passed to be rescored" scenario.
> (Whether or not the block of code in question could/should be removed I'd
> like to leave out of the scope of this current ticket here since on a high
> level not supporting {{topN != firstPassTopDocs.scoreDocs.length}} in
> {{LTRRescorer}} could simplify its code but on a practical level (at least
> theoretically) backwards compatibility would also need consideration and it's
> possible that some custom {{ReRankCollector}} (which we don't know of) does
> for some reason not cap the number of documents passed in the way
> {{ReRankCollector}} does.)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]