File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
server/src/main/java/org/elasticsearch/index/codec/vectors/diskbbq Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ public abstract class IVFVectorsWriter extends KnnVectorsWriter {
5353 private final IndexOutput ivfCentroids , ivfClusters ;
5454 private final IndexOutput ivfMeta ;
5555 private final String rawVectorFormatName ;
56+ private final int writeVersion ;
5657 private final Boolean useDirectIOReads ;
5758 private final FlatVectorsWriter rawVectorDelegate ;
5859
@@ -70,6 +71,7 @@ protected IVFVectorsWriter(
7071 );
7172
7273 this .rawVectorFormatName = rawVectorFormatName ;
74+ this .writeVersion = writeVersion ;
7375 this .useDirectIOReads = useDirectIOReads ;
7476 this .rawVectorDelegate = rawVectorDelegate ;
7577 final String metaFileName = IndexFileNames .segmentFileName (
@@ -509,7 +511,7 @@ private void writeMeta(
509511 ) throws IOException {
510512 ivfMeta .writeInt (field .number );
511513 ivfMeta .writeString (rawVectorFormatName );
512- if (useDirectIOReads != null ) {
514+ if (writeVersion >= ES920DiskBBQVectorsFormat . VERSION_DIRECT_IO ) {
513515 ivfMeta .writeByte (useDirectIOReads ? (byte ) 1 : 0 );
514516 }
515517 ivfMeta .writeInt (field .getVectorEncoding ().ordinal ());
You can’t perform that action at this time.
0 commit comments