alessandrobenedetti commented on code in PR #2348:
URL: https://github.com/apache/solr/pull/2348#discussion_r1529028001


##########
solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java:
##########
@@ -233,7 +235,14 @@ protected static boolean scoreSingleHit(
     boolean logHit = false;
 
     scorer.getDocInfo().setOriginalDocScore(hit.score);
+    QueryLimits queryLimits = QueryLimits.getCurrentLimits();
     hit.score = scorer.score();
+    if (queryLimits.maybeExitWithPartialResults(

Review Comment:
   The way I use the exception here is to accept partial results indeed (rather 
than not accepting them)
   So:
   - if partial results are not accepted the original exception is raised and 
we get a 500  from Solr
   - if partial results are accepted I use the QueryLimitsException to inform 
the above collector to revert the scoring of the partially reranked results.
   So the response will be partial because the reranking didn't happen but 
search results were returned(the motivation is described in the message).
   The rationale is that the Learning To Rank rescorer changes the scores of 
the topK search results and re-arrange them.
   Rescoring only some of them will leave the ranking and scores in an 
inconsistent status so my preference is an all/nothing approach in terms of 
reranking.
   
   Still, there is value in returning the original result set, so the original 
ranked list is returned.
   



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to