aruggero commented on code in PR #3433:
URL: https://github.com/apache/solr/pull/3433#discussion_r2244563127


##########
solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java:
##########
@@ -551,16 +554,117 @@ public DocIdSetIterator iterator() {
         return featureTraversalScorer.iterator();
       }
 
-      private class SparseModelScorer extends Scorer {
-        private final DisiPriorityQueue subScorers;
-        private final ScoringQuerySparseIterator itr;
+      public void setIsLogging(boolean isLogging) {
+        this.isLogging = isLogging;
+      }
 
-        private int targetDoc = -1;
-        private int activeDoc = -1;
+      abstract class FeatureTraversalScorer extends Scorer {
+        protected int targetDoc = -1;
+        protected int activeDoc = -1;
+        protected LeafReaderContext leafContext;
 
-        private SparseModelScorer(
-            Weight weight, List<Feature.FeatureWeight.FeatureScorer> 
featureScorers) {
+        protected FeatureTraversalScorer(Weight weight, LeafReaderContext 
leafContext) {
           super(weight);
+          this.leafContext = leafContext;
+        }
+
+        @Override
+        public float score() throws IOException {
+          reset();
+          fillFeaturesInfo();
+          return makeNormalizedFeaturesAndScore();
+        }
+
+        @Override
+        public float getMaxScore(int upTo) throws IOException {
+          return Float.POSITIVE_INFINITY;
+        }
+
+        private void fillFeaturesInfo() throws IOException {
+          if (activeDoc == targetDoc) {
+            SolrCache<Integer, float[]> featureVectorCache = null;
+            float[] featureVector;
+
+            // Check added otherwise 
org.apache.solr.ltr.TestLTRScoringQuery.testLTRScoringQuery
+            // and 
org.apache.solr.ltr.TestSelectiveWeightCreation.testScoringQueryWeightCreation
+            // fail

Review Comment:
   Ok, comment removed.



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