You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by iv...@apache.org on 2019/02/21 11:27:43 UTC

[lucene-solr] branch branch_8x updated: LUCENE-8704: Use the HeapPointWriter to spill offline as BKDWriter does

This is an automated email from the ASF dual-hosted git repository.

ivera pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 069622f  LUCENE-8704: Use the HeapPointWriter to spill offline as BKDWriter does
069622f is described below

commit 069622f61a738c35af423bb65fa0b17a0f9d3aad
Author: iverase <iv...@apache.org>
AuthorDate: Thu Feb 21 12:26:37 2019 +0100

    LUCENE-8704: Use the HeapPointWriter to spill offline as BKDWriter does
---
 .../org/apache/lucene/codecs/simpletext/SimpleTextBKDWriter.java    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextBKDWriter.java b/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextBKDWriter.java
index 9f49387..cc1140f 100644
--- a/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextBKDWriter.java
+++ b/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextBKDWriter.java
@@ -222,13 +222,9 @@ final class SimpleTextBKDWriter implements Closeable {
     // For each .add we just append to this input file, then in .finish we sort this input and resursively build the tree:
     offlinePointWriter = new OfflinePointWriter(tempDir, tempFileNamePrefix, packedBytesLength, "spill", 0);
     tempInput = offlinePointWriter.out;
-    PointReader reader = heapPointWriter.getReader(0, pointCount);
     for(int i=0;i<pointCount;i++) {
-      boolean hasNext = reader.next();
-      assert hasNext;
-      offlinePointWriter.append(reader.pointValue());
+      offlinePointWriter.append(heapPointWriter.getPackedValueSlice(i));
     }
-
     heapPointWriter = null;
   }