Skip to content

Commit bf611c3

Browse files
committed
Handle IndexedDISI in exitableIterator
1 parent 26402b2 commit bf611c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/main/java/org/elasticsearch/search/internal/ExitableDirectoryReader.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package org.elasticsearch.search.internal;
1111

1212
import org.apache.lucene.codecs.StoredFieldsReader;
13+
import org.apache.lucene.codecs.lucene90.IndexedDISI;
1314
import org.apache.lucene.index.ByteVectorValues;
1415
import org.apache.lucene.index.DirectoryReader;
1516
import org.apache.lucene.index.FilterDirectoryReader;
@@ -669,6 +670,8 @@ public FloatVectorValues copy() throws IOException {
669670
static DocIdSetIterator exitableIterator(DocIdSetIterator iterator, QueryCancellation queryCancellation) {
670671
if (iterator instanceof KnnVectorValues.DocIndexIterator docIndexIterator) {
671672
return createExitableIterator(docIndexIterator, queryCancellation);
673+
} else if (iterator instanceof IndexedDISI indexedDISI) {
674+
return createExitableIterator(IndexedDISI.asDocIndexIterator(indexedDISI), queryCancellation);
672675
} else {
673676
return new ExitableDocSetIterator(iterator, queryCancellation);
674677
}

0 commit comments

Comments
 (0)