You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/02/09 14:25:15 UTC

[GitHub] [lucene] gf2121 commented on a change in pull request #666: LUCENE-10409: Improve BKDWriter's DocIdsWriter to better encode decreasing sequences of doc IDs

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 point values are **different** in one leaf node.
   * `#readInts(IndexInput, int, IntersectVisitor)`  for cases that point values are **same** in one leaf node.
   
   This is changing the test of `#readInts(IndexInput, int, IntersectVisitor)`, which means all docs in the leaf node has the same value. So the order of ids could probably be ignored? As the method we added before in 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-unsubscribe@lucene.apache.org

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



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