Github user nknize commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/451#discussion_r219310315
  
    --- Diff: lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java ---
    @@ -981,15 +988,15 @@ public long finish(IndexOutput out) throws 
IOException {
         assert pointCount / numLeaves <= maxPointsInLeafNode: "pointCount=" + 
pointCount + " numLeaves=" + numLeaves + " maxPointsInLeafNode=" + 
maxPointsInLeafNode;
     
         // Sort all docs once by each dimension:
    -    PathSlice[] sortedPointWriters = new PathSlice[numDims];
    +    PathSlice[] sortedPointWriters = new PathSlice[numDataDims];
     
         // This is only used on exception; on normal code paths we close all 
files we opened:
         List<Closeable> toCloseHeroically = new ArrayList<>();
     
         boolean success = false;
         try {
           //long t0 = System.nanoTime();
    -      for(int dim=0;dim<numDims;dim++) {
    +      for(int dim=0;dim<numDataDims;dim++) {
    --- End diff --
    
    I made the change but then I remembered that the leaf nodes (which write 
all dimensions) require even the non indexed dimensions be sorted for 
compression (in order to compute the common prefix). I could explore delaying 
that sort operation only when its needed, but I think the recursion still needs 
sorted point writers passed through PathSlice[] so this is still necessary?


---

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

Reply via email to