Skip to content

Commit 54dc9f9

Browse files
authored
Renaming bbq_ivf to bbq_disk (#131217)
* Renaming bbq_ivf to bbq_disk * fixing tests
1 parent 1841079 commit 54dc9f9

File tree

5 files changed

+35
-33
lines changed

5 files changed

+35
-33
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/135_knn_query_nested_search_ivf.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
setup:
22
- requires:
3-
cluster_features: "mapper.ivf_nested_support"
4-
reason: 'ivf nested support required'
3+
cluster_features: "mapper.bbq_disk_support"
4+
reason: 'bbq disk support required'
55
- do:
66
indices.create:
77
index: test
@@ -24,7 +24,7 @@ setup:
2424
index: true
2525
similarity: l2_norm
2626
index_options:
27-
type: bbq_ivf
27+
type: bbq_disk
2828

2929
aliases:
3030
my_alias:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/46_knn_search_bbq_ivf.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
setup:
22
- requires:
3-
cluster_features: ["mapper.ivf_format_cluster_feature"]
4-
reason: Needs mapper.ivf_format_cluster_feature feature
3+
cluster_features: ["mapper.bbq_disk_support"]
4+
reason: Needs mapper.bbq_disk_support feature
55
- skip:
66
features: "headers"
77
- do:
88
indices.create:
9-
index: bbq_ivf
9+
index: bbq_disk
1010
body:
1111
settings:
1212
index:
@@ -19,11 +19,11 @@ setup:
1919
index: true
2020
similarity: max_inner_product
2121
index_options:
22-
type: bbq_ivf
22+
type: bbq_disk
2323

2424
- do:
2525
index:
26-
index: bbq_ivf
26+
index: bbq_disk
2727
id: "1"
2828
body:
2929
vector: [0.077, 0.32 , -0.205, 0.63 , 0.032, 0.201, 0.167, -0.313,
@@ -37,11 +37,11 @@ setup:
3737
# Flush in order to provoke a merge later
3838
- do:
3939
indices.flush:
40-
index: bbq_ivf
40+
index: bbq_disk
4141

4242
- do:
4343
index:
44-
index: bbq_ivf
44+
index: bbq_disk
4545
id: "2"
4646
body:
4747
vector: [0.196, 0.514, 0.039, 0.555, -0.042, 0.242, 0.463, -0.348,
@@ -55,11 +55,11 @@ setup:
5555
# Flush in order to provoke a merge later
5656
- do:
5757
indices.flush:
58-
index: bbq_ivf
58+
index: bbq_disk
5959

6060
- do:
6161
index:
62-
index: bbq_ivf
62+
index: bbq_disk
6363
id: "3"
6464
body:
6565
name: rabbit.jpg
@@ -74,11 +74,11 @@ setup:
7474
# Flush in order to provoke a merge later
7575
- do:
7676
indices.flush:
77-
index: bbq_ivf
77+
index: bbq_disk
7878

7979
- do:
8080
indices.forcemerge:
81-
index: bbq_ivf
81+
index: bbq_disk
8282
max_num_segments: 1
8383

8484
- do:
@@ -87,7 +87,7 @@ setup:
8787
"Test knn search":
8888
- do:
8989
search:
90-
index: bbq_ivf
90+
index: bbq_disk
9191
body:
9292
knn:
9393
field: vector
@@ -116,7 +116,7 @@ setup:
116116
Content-Type: application/json
117117
search:
118118
rest_total_hits_as_int: true
119-
index: bbq_ivf
119+
index: bbq_disk
120120
body:
121121
knn:
122122
field: vector
@@ -182,7 +182,7 @@ setup:
182182
element_type: byte
183183
index: true
184184
index_options:
185-
type: bbq_ivf
185+
type: bbq_disk
186186

187187
- do:
188188
catch: bad_request
@@ -196,7 +196,7 @@ setup:
196196
dims: 64
197197
index: false
198198
index_options:
199-
type: bbq_ivf
199+
type: bbq_disk
200200
---
201201
"Test index configured rescore vector":
202202
- skip:
@@ -216,7 +216,7 @@ setup:
216216
index: true
217217
similarity: max_inner_product
218218
index_options:
219-
type: bbq_ivf
219+
type: bbq_disk
220220
rescore_vector:
221221
oversample: 1.5
222222

@@ -298,7 +298,7 @@ setup:
298298
vector:
299299
type: dense_vector
300300
index_options:
301-
type: bbq_ivf
301+
type: bbq_disk
302302
rescore_vector:
303303
oversample: 0
304304

@@ -314,7 +314,7 @@ setup:
314314
vector:
315315
type: dense_vector
316316
index_options:
317-
type: bbq_ivf
317+
type: bbq_disk
318318
rescore_vector:
319319
oversample: 1
320320

@@ -326,7 +326,7 @@ setup:
326326
vector:
327327
type: dense_vector
328328
index_options:
329-
type: bbq_ivf
329+
type: bbq_disk
330330
rescore_vector:
331331
oversample: 0
332332

@@ -354,7 +354,7 @@ setup:
354354
index: true
355355
similarity: max_inner_product
356356
index_options:
357-
type: bbq_ivf
357+
type: bbq_disk
358358
rescore_vector:
359359
oversample: 0
360360

@@ -430,7 +430,7 @@ setup:
430430
index: true
431431
similarity: max_inner_product
432432
index_options:
433-
type: bbq_ivf
433+
type: bbq_disk
434434
rescore_vector:
435435
oversample: 2
436436

@@ -470,7 +470,7 @@ setup:
470470
index: true
471471
similarity: max_inner_product
472472
index_options:
473-
type: bbq_ivf
473+
type: bbq_disk
474474
rescore_vector:
475475
oversample: 0
476476

@@ -509,6 +509,6 @@ setup:
509509
"default oversample value":
510510
- do:
511511
indices.get_mapping:
512-
index: bbq_ivf
512+
index: bbq_disk
513513

514-
- match: { bbq_ivf.mappings.properties.vector.index_options.rescore_vector.oversample: 3.0 }
514+
- match: { bbq_disk.mappings.properties.vector.index_options.rescore_vector.oversample: 3.0 }

server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class MapperFeatures implements FeatureSpecification {
4444
static final NodeFeature NPE_ON_DIMS_UPDATE_FIX = new NodeFeature("mapper.npe_on_dims_update_fix");
4545
static final NodeFeature IVF_FORMAT_CLUSTER_FEATURE = new NodeFeature("mapper.ivf_format_cluster_feature");
4646
static final NodeFeature IVF_NESTED_SUPPORT = new NodeFeature("mapper.ivf_nested_support");
47+
static final NodeFeature BBQ_DISK_SUPPORT = new NodeFeature("mapper.bbq_disk_support");
4748
static final NodeFeature SEARCH_LOAD_PER_SHARD = new NodeFeature("mapper.search_load_per_shard");
4849
static final NodeFeature PATTERNED_TEXT = new NodeFeature("mapper.patterned_text");
4950

@@ -76,6 +77,7 @@ public Set<NodeFeature> getTestFeatures() {
7677
USE_DEFAULT_OVERSAMPLE_VALUE_FOR_BBQ,
7778
IVF_FORMAT_CLUSTER_FEATURE,
7879
IVF_NESTED_SUPPORT,
80+
BBQ_DISK_SUPPORT,
7981
SEARCH_LOAD_PER_SHARD,
8082
SPARSE_VECTOR_INDEX_OPTIONS_FEATURE,
8183
PATTERNED_TEXT

server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ public boolean supportsDimension(int dims) {
16751675
return dims >= BBQ_MIN_DIMS;
16761676
}
16771677
},
1678-
BBQ_IVF("bbq_ivf", true) {
1678+
BBQ_DISK("bbq_disk", true) {
16791679
@Override
16801680
public DenseVectorIndexOptions parseIndexOptions(String fieldName, Map<String, ?> indexOptionsMap, IndexVersion indexVersion) {
16811681
Object clusterSizeNode = indexOptionsMap.remove("cluster_size");
@@ -2295,7 +2295,7 @@ static class BBQIVFIndexOptions extends QuantizedIndexOptions {
22952295
final int defaultNProbe;
22962296

22972297
BBQIVFIndexOptions(int clusterSize, int defaultNProbe, RescoreVector rescoreVector) {
2298-
super(VectorIndexType.BBQ_IVF, rescoreVector);
2298+
super(VectorIndexType.BBQ_DISK, rescoreVector);
22992299
this.clusterSize = clusterSize;
23002300
this.defaultNProbe = defaultNProbe;
23012301
}

server/src/test/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapperTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ public void testIVFParsing() throws IOException {
13671367
b.field("index", true);
13681368
b.field("similarity", "dot_product");
13691369
b.startObject("index_options");
1370-
b.field("type", "bbq_ivf");
1370+
b.field("type", "bbq_disk");
13711371
b.endObject();
13721372
}));
13731373

@@ -1386,7 +1386,7 @@ public void testIVFParsing() throws IOException {
13861386
b.field("index", true);
13871387
b.field("similarity", "dot_product");
13881388
b.startObject("index_options");
1389-
b.field("type", "bbq_ivf");
1389+
b.field("type", "bbq_disk");
13901390
b.field("cluster_size", 1000);
13911391
b.field("default_n_probe", 10);
13921392
b.field(DenseVectorFieldMapper.RescoreVector.NAME, Map.of("oversample", 2.0f));
@@ -1413,7 +1413,7 @@ public void testIVFParsingFailureInRelease() {
14131413
b -> b.field("type", "dense_vector")
14141414
.field("dims", dims)
14151415
.startObject("index_options")
1416-
.field("type", "bbq_ivf")
1416+
.field("type", "bbq_disk")
14171417
.endObject()
14181418
)
14191419
)
@@ -2815,7 +2815,7 @@ public void testKnnBBQIVFVectorsFormat() throws IOException {
28152815
b.field("index", true);
28162816
b.field("similarity", "dot_product");
28172817
b.startObject("index_options");
2818-
b.field("type", "bbq_ivf");
2818+
b.field("type", "bbq_disk");
28192819
b.endObject();
28202820
}));
28212821
CodecService codecService = new CodecService(mapperService, BigArrays.NON_RECYCLING_INSTANCE);

0 commit comments

Comments
 (0)