Skip to content

Commit 035df7d

Browse files
committed
Make knn quantized tests more reliable
1 parent 85f5222 commit 035df7d

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/41_knn_search_bbq_hnsw.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ setup:
7171
indices.flush:
7272
index: bbq_hnsw
7373

74+
# For added test reliability, pending the resolution of https://github.com/elastic/elasticsearch/issues/109416.
75+
- do:
76+
indices.forcemerge:
77+
index: bbq_hnsw
78+
max_num_segments: 1
79+
- do:
80+
indices.refresh: {}
7481
- do:
7582
indices.forcemerge:
7683
index: bbq_hnsw

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/41_knn_search_byte_quantized.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ setup:
6767
indices.flush:
6868
index: hnsw_byte_quantized
6969

70+
# For added test reliability, pending the resolution of https://github.com/elastic/elasticsearch/issues/109416.
71+
- do:
72+
indices.forcemerge:
73+
index: hnsw_byte_quantized
74+
max_num_segments: 1
75+
- do:
76+
indices.refresh: {}
7077
- do:
7178
indices.forcemerge:
7279
index: hnsw_byte_quantized

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/41_knn_search_half_byte_quantized.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ setup:
6060
vector: [0.5, 111.3, -13.0, 14.8]
6161
another_vector: [-0.5, 11.0, 0, 12]
6262

63+
# For added test reliability, pending the resolution of https://github.com/elastic/elasticsearch/issues/109416.
6364
- do:
6465
indices.forcemerge:
6566
index: hnsw_byte_quantized
@@ -68,6 +69,11 @@ setup:
6869
- do:
6970
indices.refresh: {}
7071

72+
- do:
73+
indices.forcemerge:
74+
index: hnsw_byte_quantized
75+
max_num_segments: 1
76+
7177
---
7278
"kNN search only":
7379
- do:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/42_knn_search_bbq_flat.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ setup:
7070
indices.flush:
7171
index: bbq_flat
7272

73+
# For added test reliability, pending the resolution of https://github.com/elastic/elasticsearch/issues/109416.
74+
- do:
75+
indices.forcemerge:
76+
index: bbq_flat
77+
max_num_segments: 1
78+
- do:
79+
indices.refresh: {}
7380
- do:
7481
indices.forcemerge:
7582
index: bbq_flat

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/42_knn_search_int8_flat.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,17 @@ setup:
5757
vector: [0.5, 111.3, -13.0, 14.8, -156.0]
5858
another_vector: [-0.5, 11.0, 0, 12, 111.0]
5959

60+
# For added test reliability, pending the resolution of https://github.com/elastic/elasticsearch/issues/109416.
61+
- do:
62+
indices.forcemerge:
63+
index: int8_flat
64+
max_num_segments: 1
6065
- do:
6166
indices.refresh: {}
67+
- do:
68+
indices.forcemerge:
69+
index: int8_flat
70+
max_num_segments: 1
6271

6372
---
6473
"kNN search only":

0 commit comments

Comments
 (0)