You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jb...@apache.org on 2020/07/13 15:27:06 UTC

[lucene-solr] branch jira/SOLR-14608-export updated: SOLR-14608: Wire-up the MergeIterator part three

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

jbernste pushed a commit to branch jira/SOLR-14608-export
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/jira/SOLR-14608-export by this push:
     new 32e92c5  SOLR-14608: Wire-up the MergeIterator part three
32e92c5 is described below

commit 32e92c5025637e4b6cd940628a491fe6b7e7cb13
Author: Joel Bernstein <jb...@apache.org>
AuthorDate: Mon Jul 13 11:26:56 2020 -0400

    SOLR-14608: Wire-up the MergeIterator part three
---
 solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java | 4 +++-
 solr/core/src/java/org/apache/solr/handler/export/StringValue.java  | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java b/solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java
index 47876cf..3fd94f4 100644
--- a/solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java
+++ b/solr/core/src/java/org/apache/solr/handler/export/ExportWriter.java
@@ -752,9 +752,11 @@ public class ExportWriter implements SolrCore.RawWriter, Closeable {
       }
 
       if(sortDoc != null) {
-        //Load the global ordinals which will be used
+        //Clear the bit so it's not loaded again.
         bits.clear(sortDoc.docId);
+        //Load the global ordinal (only matters for strings)
         sortDoc.setGlobalValues(lastDoc);
+        //Save this doc so we don't have to lookup the global ordinal for the next doc if they have the same segment ordinal.
         lastDoc.setValues(sortDoc);
       }
 
diff --git a/solr/core/src/java/org/apache/solr/handler/export/StringValue.java b/solr/core/src/java/org/apache/solr/handler/export/StringValue.java
index d9588bb..689f85a 100644
--- a/solr/core/src/java/org/apache/solr/handler/export/StringValue.java
+++ b/solr/core/src/java/org/apache/solr/handler/export/StringValue.java
@@ -103,6 +103,7 @@ class StringValue implements SortValue {
     this.currentOrd = v.currentOrd;
     this.present = v.present;
     this.leafOrd = v.leafOrd;
+    this.lastOrd = v.lastOrd;
   }
 
   public Object getCurrentValue() throws IOException {