cpoerschke commented on code in PR #937:
URL: https://github.com/apache/solr/pull/937#discussion_r1114576195


##########
solr/modules/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java:
##########
@@ -362,9 +363,13 @@ private void implTransform(SolrDocument doc, int docid, 
Float score) throws IOEx
       LTRScoringQuery rerankingQuery = rerankingQueries[0];
       LTRScoringQuery.ModelWeight rerankingModelWeight = modelWeights[0];
       for (int i = 1; i < rerankingQueries.length; i++) {
-        if (((LTRInterleavingScoringQuery) rerankingQueriesFromContext[i])
-            .getPickedInterleavingDocIds()
-            .contains(docid)) {
+        Set<Integer> pickedInterleavingDocIds =
+            ((LTRInterleavingScoringQuery) rerankingQueriesFromContext[i])
+                .getPickedInterleavingDocIds();
+        if (pickedInterleavingDocIds == null) {
+          return;
+        }
+        if (pickedInterleavingDocIds.contains(docid)) {

Review Comment:
   I wonder if this could be combined here? Will add a commit to explore, feel 
free to revert.
   ```suggestion
           if (pickedInterleavingDocIds != null &&
               pickedInterleavingDocIds.contains(docid)) {
   ```



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