gf2121 commented on a change in pull request #666:
URL: https://github.com/apache/lucene/pull/666#discussion_r802715789



##########
File path: lucene/core/src/test/org/apache/lucene/util/bkd/TestDocIdsWriter.java
##########
@@ -166,6 +184,9 @@ public Relation compare(byte[] minPackedValue, byte[] 
maxPackedValue) {
               throw new UnsupportedOperationException();
             }
           });
+      // ignore order
+      Arrays.sort(ints);

Review comment:
       Thanks @iverase for feedback!
   
   There are two methods to decode docIDs in DocIdsWriter: 
   
   * `#readInts(IndexInput, int, int[])` for cases that docs are **partial** 
required in one leaf node.
   * `#readInts(IndexInput, int, IntersectVisitor)`  for cases that docs are 
**all** required in one leaf node.
   
   This is changing the test of `#readInts(IndexInput, int, IntersectVisitor)`, 
which means all docs in the leaf node are required. So the order of ids could 
probably be ignored? 
   
   I'm changing this because the method we added before is 
`#visit(DocIdSetIterator iter)`, and docIDs in `DocIdSetIterator` must be in 
increasing order. So i think we need to either change the `IntersectVisitor` 
interface (a bit more invasive) or ignore order to introduce this optimization. 
   
   What do you 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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to