Github user iverase commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/451#discussion_r217970618
--- 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 think we should only create sorted point writers for indexed dims. There
is no point sort data dims as it only creates overhead when writing the tree.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]