dnhatn commented on a change in pull request #1263: LUCENE-9228: Sort dv 
updates by terms by applying
URL: https://github.com/apache/lucene-solr/pull/1263#discussion_r380797423
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/index/FrozenBufferedUpdates.java
 ##########
 @@ -808,10 +808,17 @@ private void setField(String field) throws IOException {
         } else {
           termsEnum = null;
         }
+        currentTermVisited = false;
       }
     }
 
-    DocIdSetIterator nextTerm(String field, BytesRef term) throws IOException {
+    /**
+     * Returns a {@link DocIdSetIterator} for the given field and term if 
exists. If the parameter
+     * {@code skipIfTermVisited} is true, then this method will return null if 
the given and field
+     * was visited already. This optimization is currently used in
+     * {@link #applyDocValuesUpdates(BufferedUpdatesStream.SegmentState, Map, 
long, boolean)}
+     */
+    DocIdSetIterator nextTerm(String field, BytesRef term, boolean 
skipIfTermVisited) throws IOException {
 
 Review comment:
   FYI, I am benchmarking the new change.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to