5656import org .elasticsearch .index .codec .vectors .ES815BitFlatVectorFormat ;
5757import org .elasticsearch .index .codec .vectors .ES815HnswBitVectorsFormat ;
5858import org .elasticsearch .index .codec .vectors .diskbbq .ES920DiskBBQVectorsFormat ;
59- import org .elasticsearch .index .codec .vectors .es818 .DirectIOES818HnswBinaryQuantizedVectorsFormat ;
6059import org .elasticsearch .index .codec .vectors .es818 .ES818BinaryQuantizedVectorsFormat ;
6160import org .elasticsearch .index .codec .vectors .es818 .ES818HnswBinaryQuantizedVectorsFormat ;
6261import org .elasticsearch .index .fielddata .FieldDataContext ;
@@ -1449,7 +1448,7 @@ public boolean supportsDimension(int dims) {
14491448 public DenseVectorIndexOptions parseIndexOptions (String fieldName , Map <String , ?> indexOptionsMap , IndexVersion indexVersion ) {
14501449 Object mNode = indexOptionsMap .remove ("m" );
14511450 Object efConstructionNode = indexOptionsMap .remove ("ef_construction" );
1452- Object disableOffheapCacheRescoringNode = indexOptionsMap .remove ("disable_offheap_cache_rescoring " );
1451+ Object directRawVectorReadsNode = indexOptionsMap .remove ("direct_raw_vector_reads " );
14531452
14541453 if (mNode == null ) {
14551454 mNode = Lucene99HnswVectorsFormat .DEFAULT_MAX_CONN ;
@@ -1468,10 +1467,10 @@ public DenseVectorIndexOptions parseIndexOptions(String fieldName, Map<String, ?
14681467 }
14691468 }
14701469
1471- boolean disableOffheapCacheRescoring = XContentMapValues .nodeBooleanValue (disableOffheapCacheRescoringNode , false );
1470+ boolean directRawVectorReads = XContentMapValues .nodeBooleanValue (directRawVectorReadsNode , false );
14721471
14731472 MappingParser .checkNoRemainingFields (fieldName , indexOptionsMap );
1474- return new BBQHnswIndexOptions (m , efConstruction , rescoreVector , disableOffheapCacheRescoring );
1473+ return new BBQHnswIndexOptions (m , efConstruction , rescoreVector , directRawVectorReads );
14751474 }
14761475
14771476 @ Override
@@ -2019,21 +2018,19 @@ public String toString() {
20192018 public static class BBQHnswIndexOptions extends QuantizedIndexOptions {
20202019 private final int m ;
20212020 private final int efConstruction ;
2022- private final boolean disableOffheapCacheRescoring ;
2021+ private final boolean directRawVectorReads ;
20232022
2024- public BBQHnswIndexOptions (int m , int efConstruction , RescoreVector rescoreVector , boolean disableOffheapCacheRescoring ) {
2023+ public BBQHnswIndexOptions (int m , int efConstruction , RescoreVector rescoreVector , boolean directRawVectorReads ) {
20252024 super (VectorIndexType .BBQ_HNSW , rescoreVector );
20262025 this .m = m ;
20272026 this .efConstruction = efConstruction ;
2028- this .disableOffheapCacheRescoring = disableOffheapCacheRescoring ;
2027+ this .directRawVectorReads = directRawVectorReads ;
20292028 }
20302029
20312030 @ Override
20322031 KnnVectorsFormat getVectorsFormat (ElementType elementType ) {
20332032 assert elementType == ElementType .FLOAT ;
2034- return disableOffheapCacheRescoring
2035- ? new DirectIOES818HnswBinaryQuantizedVectorsFormat (m , efConstruction )
2036- : new ES818HnswBinaryQuantizedVectorsFormat (m , efConstruction );
2033+ return new ES818HnswBinaryQuantizedVectorsFormat (m , efConstruction );
20372034 }
20382035
20392036 @ Override
@@ -2048,12 +2045,12 @@ boolean doEquals(DenseVectorIndexOptions other) {
20482045 return m == that .m
20492046 && efConstruction == that .efConstruction
20502047 && Objects .equals (rescoreVector , that .rescoreVector )
2051- && disableOffheapCacheRescoring == that .disableOffheapCacheRescoring ;
2048+ && directRawVectorReads == that .directRawVectorReads ;
20522049 }
20532050
20542051 @ Override
20552052 int doHashCode () {
2056- return Objects .hash (m , efConstruction , rescoreVector , disableOffheapCacheRescoring );
2053+ return Objects .hash (m , efConstruction , rescoreVector , directRawVectorReads );
20572054 }
20582055
20592056 @ Override
@@ -2067,7 +2064,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
20672064 builder .field ("type" , type );
20682065 builder .field ("m" , m );
20692066 builder .field ("ef_construction" , efConstruction );
2070- if (disableOffheapCacheRescoring ) {
2067+ if (directRawVectorReads ) {
20712068 builder .field ("disable_offheap_cache_rescoring" , true );
20722069 }
20732070 if (rescoreVector != null ) {
0 commit comments