SOLR-9582: reset lastDocID when switching to a new LeafReader

This commit is contained in:
mikemccand 2016-09-29 21:24:13 +02:00
parent 063d624cdc
commit 7d13f3ecd2
1 changed files with 4 additions and 0 deletions

View File

@ -871,6 +871,7 @@ public class SortingResponseWriter implements QueryResponseWriter {
public void setNextReader(LeafReaderContext context) throws IOException {
this.vals = DocValues.getNumeric(context.reader(), field);
lastDocID = 0;
}
public void setCurrentValue(int docId) throws IOException {
@ -962,6 +963,7 @@ public class SortingResponseWriter implements QueryResponseWriter {
public void setNextReader(LeafReaderContext context) throws IOException {
this.vals = DocValues.getNumeric(context.reader(), field);
lastDocID = 0;
}
public void setCurrentValue(int docId) throws IOException {
@ -1054,6 +1056,7 @@ public class SortingResponseWriter implements QueryResponseWriter {
public void setNextReader(LeafReaderContext context) throws IOException {
this.vals = DocValues.getNumeric(context.reader(), field);
lastDocID = 0;
}
public void setCurrentValue(int docId) throws IOException {
@ -1146,6 +1149,7 @@ public class SortingResponseWriter implements QueryResponseWriter {
public void setNextReader(LeafReaderContext context) throws IOException {
this.reader = context.reader();
this.vals = DocValues.getNumeric(this.reader, this.field);
lastDocID = 0;
}
public void setCurrentValue(int docId) throws IOException {