lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iv...@apache.org
Subject [lucene-solr] branch master updated: LUCENE-8704: Use the HeapPointWriter to spill offline as BKDWriter does
Date Thu, 21 Feb 2019 11:26:55 GMT
This is an automated email from the ASF dual-hosted git repository.

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


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

commit f5a4159d75a26fce34dda0c3ecb05551e15c1f77
Author: iverase <ivera@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;
   }
 


Mime
View raw message