jpountz commented on a change in pull request #746: LUCENE-8885: Optimise BKD reader by exploiting cardinality information stored on leaves URL: https://github.com/apache/lucene-solr/pull/746#discussion_r298797885
########## File path: lucene/core/src/test/org/apache/lucene/util/bkd/TestBKD.java ########## @@ -844,7 +845,28 @@ public void visit(int docID, byte[] packedValue) { hits.set(docID); } - @Override + @Override + public void visit(DocIdSetIterator iterator, byte[] packedValue) throws IOException { + if (random().nextBoolean()) { + //check the default method is correct + IntersectVisitor.super.visit(iterator, packedValue); + } else { + assertTrue(iterator.docID() == -1); + int cost = (int) iterator.cost(); + int numberOfPoints = 0; + int docID; + while ((docID = iterator.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) { + visit(docID, packedValue); Review comment: let's assert on the value of docID() here as well? ---------------------------------------------------------------- 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org