mirror of https://github.com/apache/lucene.git
LUCENE-10598: Fix docValueCount() on Lucene80 sparse sorted set doc values.
This commit is contained in:
parent
ee99a2a452
commit
267a5fcc15
|
@ -1653,15 +1653,21 @@ final class Lucene80DocValuesProducer extends DocValuesProducer {
|
|||
return disi.advanceExact(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long nextOrd() throws IOException {
|
||||
private boolean set() {
|
||||
if (set == false) {
|
||||
final int index = disi.index();
|
||||
final long start = addresses.get(index);
|
||||
this.start = start + 1;
|
||||
start = addresses.get(index);
|
||||
end = addresses.get(index + 1L);
|
||||
set = true;
|
||||
return ords.get(start);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long nextOrd() throws IOException {
|
||||
if (set()) {
|
||||
return ords.get(start++);
|
||||
} else if (start == end) {
|
||||
return NO_MORE_ORDS;
|
||||
} else {
|
||||
|
@ -1671,6 +1677,7 @@ final class Lucene80DocValuesProducer extends DocValuesProducer {
|
|||
|
||||
@Override
|
||||
public long docValueCount() {
|
||||
set();
|
||||
return end - start;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue