sigram commented on code in PR #2348: URL: https://github.com/apache/solr/pull/2348#discussion_r1528826795
########## 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( + "Learning To Rank rescoring -" + + " The full reranking didn't complete and got reverted." + + " All documents preserved their original score and ranking.")) { + throw new QueryLimitsExceededException("The Time Allowed has been exceeded when rescoring"); Review Comment: It's not necessarily `timeAllowed` now ... any other limit may have been exceeded. A better wording would be "A query limit has been exceeded". Edit: but see above comment - I think this is not needed at all, `maybeExit` already throws an exception when partial results are not acceptable. -- 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