iverase commented on a change in pull request #1464:
URL: https://github.com/apache/lucene-solr/pull/1464#discussion_r417917762



##########
File path: lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java
##########
@@ -730,6 +730,22 @@ private void rotateToTree(int nodeID, int offset, int 
count, byte[] index, List<
     return newLeafBlockFPs;
   }
 
+  private int getNumLeftLeaveNodes(int numLeaves) {
+    // return the max level for this number of leaves. If level is full it 
returns the next level
+    int maxLevel = 32 - Integer.numberOfLeadingZeros(numLeaves);

Review comment:
       I have rewritten the method (and fix some grammatical mistakes) to make 
it more clear. I think the best way is to start calculating the full level 
which can be done using:
   
   ```
   int lastFullLevel = 31 - Integer.numberOfLeadingZeros(numLeaves);
   ```
   
   Then it is clear what we are doing.




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



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

Reply via email to