Skip to content

Commit 374f041

Browse files
committed
Fix references
1 parent 8036e8c commit 374f041

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

server/src/main/java/org/elasticsearch/index/codec/vectors/es91/ES91BFloat16FlatVectorsFormat.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.apache.lucene.codecs.hnsw.FlatVectorsReader;
2424
import org.apache.lucene.codecs.hnsw.FlatVectorsScorer;
2525
import org.apache.lucene.codecs.hnsw.FlatVectorsWriter;
26-
import org.apache.lucene.codecs.lucene99.ES91BFloat16FlatVectorsReader;
2726
import org.apache.lucene.index.SegmentReadState;
2827
import org.apache.lucene.index.SegmentWriteState;
2928

server/src/main/java/org/elasticsearch/index/codec/vectors/es91/ES91BFloat16FlatVectorsReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public ES91BFloat16FlatVectorsReader(SegmentReadState state, FlatVectorsScorer s
8181
state.context.withHints(FileTypeHint.DATA, FileDataHint.KNN_VECTORS, DataAccessHint.RANDOM)
8282
);
8383
} catch (Throwable t) {
84-
IOUtils.closeWhileSuppressingExceptions(t, this);
84+
IOUtils.closeWhileHandlingException(this);
8585
throw t;
8686
}
8787
}
@@ -141,7 +141,7 @@ private static IndexInput openDataInput(
141141
CodecUtil.retrieveChecksum(in);
142142
return in;
143143
} catch (Throwable t) {
144-
IOUtils.closeWhileSuppressingExceptions(t, in);
144+
IOUtils.closeWhileHandlingException(in);
145145
throw t;
146146
}
147147
}

server/src/main/java/org/elasticsearch/index/codec/vectors/es91/ES91BFloat16FlatVectorsWriter.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
import java.util.ArrayList;
5858
import java.util.List;
5959

60-
import static org.apache.lucene.codecs.lucene99.Lucene99FlatVectorsFormat.DIRECT_MONOTONIC_BLOCK_SHIFT;
6160
import static org.apache.lucene.search.DocIdSetIterator.NO_MORE_DOCS;
6261

6362
/**
@@ -109,7 +108,7 @@ public ES91BFloat16FlatVectorsWriter(SegmentWriteState state, FlatVectorsScorer
109108
state.segmentSuffix
110109
);
111110
} catch (Throwable t) {
112-
IOUtils.closeWhileSuppressingExceptions(t, this);
111+
IOUtils.closeWhileHandlingException(this);
113112
throw t;
114113
}
115114
}
@@ -302,8 +301,8 @@ public CloseableRandomVectorScorerSupplier mergeOneFieldToIndex(FieldInfo fieldI
302301
segmentWriteState.directory.deleteFile(tempVectorData.getName());
303302
}, docsWithField.cardinality(), randomVectorScorerSupplier);
304303
} catch (Throwable t) {
305-
IOUtils.closeWhileSuppressingExceptions(t, vectorDataInput, tempVectorData);
306-
IOUtils.deleteFilesSuppressingExceptions(t, segmentWriteState.directory, tempVectorData.getName());
304+
IOUtils.closeWhileHandlingException(vectorDataInput, tempVectorData);
305+
IOUtils.deleteFilesIgnoringExceptions(segmentWriteState.directory, tempVectorData.getName());
307306
throw t;
308307
}
309308
}
@@ -320,7 +319,7 @@ private void writeMeta(FieldInfo field, int maxDoc, long vectorDataOffset, long
320319
// write docIDs
321320
int count = docsWithField.cardinality();
322321
meta.writeInt(count);
323-
OrdToDocDISIReaderConfiguration.writeStoredMeta(DIRECT_MONOTONIC_BLOCK_SHIFT, meta, vectorData, count, maxDoc, docsWithField);
322+
OrdToDocDISIReaderConfiguration.writeStoredMeta(16, meta, vectorData, count, maxDoc, docsWithField);
324323
}
325324

326325
/**

0 commit comments

Comments
 (0)