Apache Solr open-source search software
SOLR-16399: ExportWriter fails with max values for fields (#995)
Kevin Risden2fec44b12bd0
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex efcee6bb1f5..74a4f944871 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -128,6 +128,8 @@ Bug Fixes* SOLR-16316: Fix debugQuery clicking on the Query UI does not show the debug.explain.structured option. (Shiming Li via Eric Pugh)+* SOLR-16399: ExportWriter fails with max values for fields (Kevin Risden)+Other Changes---------------------* SOLR-16351: Upgrade Carrot2 to 4.4.3, upgrade randomizedtesting to 2.8.0. (Dawid Weiss)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.javaindex 712bc9b4367..61a76674516 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@@ -804,7 +804,9 @@ public class ExportWriter implements SolrCore.RawWriter, Closeable {int docId;while ((docId = it.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {this.sortDoc.setValues(docId);- if (top.lessThan(this.sortDoc)) {+ // Always set the top doc if previously not set, otherwise+ // set the top if the sortDoc is greater than current+ if (top.lessThan(this.sortDoc) || top.docId == -1) {top.setValues(this.sortDoc);top = queue.updateTop();}