19
19
import org .elasticsearch .index .fielddata .AbstractSortedDocValues ;
20
20
import org .elasticsearch .index .fielddata .AbstractSortedSetDocValues ;
21
21
22
- import java .io .IOException ;
23
22
import java .util .Collection ;
24
23
import java .util .List ;
25
24
@@ -107,7 +106,6 @@ private static class SingleDocs extends AbstractSortedDocValues {
107
106
108
107
private int currentDoc = -1 ;
109
108
private long currentStartOffset ;
110
- private long currentEndOffset ;
111
109
112
110
SingleDocs (MultiOrdinals ordinals , ValuesHolder values ) {
113
111
this .valueCount = (int ) ordinals .valueCount ;
@@ -122,11 +120,10 @@ public int ordValue() {
122
120
}
123
121
124
122
@ Override
125
- public boolean advanceExact (int docId ) throws IOException {
123
+ public boolean advanceExact (int docId ) {
126
124
currentDoc = docId ;
127
125
currentStartOffset = docId != 0 ? endOffsets .get (docId - 1 ) : 0 ;
128
- currentEndOffset = endOffsets .get (docId );
129
- return currentStartOffset != currentEndOffset ;
126
+ return currentStartOffset != endOffsets .get (docId );
130
127
}
131
128
132
129
@ Override
@@ -169,14 +166,14 @@ public long getValueCount() {
169
166
}
170
167
171
168
@ Override
172
- public boolean advanceExact (int docId ) throws IOException {
169
+ public boolean advanceExact (int docId ) {
173
170
currentOffset = docId != 0 ? endOffsets .get (docId - 1 ) : 0 ;
174
171
currentEndOffset = endOffsets .get (docId );
175
172
return currentOffset != currentEndOffset ;
176
173
}
177
174
178
175
@ Override
179
- public long nextOrd () throws IOException {
176
+ public long nextOrd () {
180
177
if (currentOffset == currentEndOffset ) {
181
178
return SortedSetDocValues .NO_MORE_ORDS ;
182
179
} else {
0 commit comments