jpountz commented on a change in pull request #730: LUCENE-8868: New storing 
strategy for BKD tree leaves with low cardinality
URL: https://github.com/apache/lucene-solr/pull/730#discussion_r295685759
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/util/bkd/BKDReader.java
 ##########
 @@ -441,8 +441,15 @@ int readDocIDs(IndexInput in, long blockFP, int[] docIDs) 
throws IOException {
 
   void visitDocValues(int[] commonPrefixLengths, byte[] 
scratchDataPackedValue, byte[] scratchMinIndexPackedValue, byte[] 
scratchMaxIndexPackedValue,
                       IndexInput in, int[] docIDs, int count, IntersectVisitor 
visitor) throws IOException {
+    if (version >= BKDWriter.VERSION_LOW_CARDINALITY_LEAVES) {
+      visitDocValuesWithCardinality(commonPrefixLengths, 
scratchDataPackedValue, scratchMinIndexPackedValue, scratchMaxIndexPackedValue, 
in, docIDs, count, visitor);
+    } else {
+      visitDocValuesNoCardinality(commonPrefixLengths, scratchDataPackedValue, 
scratchMinIndexPackedValue, scratchMaxIndexPackedValue, in, docIDs, count, 
visitor);
+    }
 
 Review comment:
   could we always call visitDocValuesWithCardinality? It seems to include the 
version check already?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to