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