cpoerschke commented on a change in pull request #192:
URL: https://github.com/apache/solr/pull/192#discussion_r671308391



##########
File path: solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java
##########
@@ -186,13 +186,41 @@ public void scoreFeatures(IndexSearcher indexSearcher,
         docBase = readerContext.docBase;
         scorer = modelWeight.scorer(readerContext);
       }
-      scoreSingleHit(indexSearcher, topN, modelWeight, docBase, hitUpto, hit, 
docID, scoringQuery, scorer, reranked);
+      if (scoreSingleHit(topN, docBase, hitUpto, hit, docID, scorer, 
reranked)) {
+        logSingleHit(indexSearcher, modelWeight, hit.doc, scoringQuery);
+      }
       hitUpto++;
     }
   }
 
+  /**
+   * @deprecated Use {@link #scoreSingleHit(int, int, int, ScoreDoc, int, 
org.apache.solr.ltr.LTRScoringQuery.ModelWeight.ModelScorer, ScoreDoc[])}
+   * and {@link #logSingleHit(IndexSearcher, 
org.apache.solr.ltr.LTRScoringQuery.ModelWeight, int, LTRScoringQuery)} instead.
+   */
+  @Deprecated

Review comment:
       `LTRRescorer` isn't a configurable class (unlike the LTR feature and 
model classes) and the deprecated method here maintains build backwards 
compatibility for anyone who may have built a custom plugin with a custom 
rescorer. So on that basis I consider the changes in this pull request an 
implementation internal code refactor for which no `solr/CHANGES.txt` entry is 
needed. But please let me know if you think otherwise.
   
   The deprecated method can be removed on `main` branch for 9.0 onwards I 
think.




-- 
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]

Reply via email to