Skip to content

Commit

Permalink
Add capability for BwC tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Dec 2, 2024
1 parent ee904b0 commit 0d77521
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ setup:

---
"Vector rescoring has similar ordering as knn, same scoring as exact search for kNN section":
- requires:
reason: 'Quantized vector rescoring is required'
test_runner_features: [capabilities]
capabilities:
- method: GET
path: /_search
capabilities: [knn_quantized_vector_rescore]
- skip:
features: "headers"
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,15 @@ setup:
---
# Won't be true for larger datasets, but this helps checking kNN vs rescoring vs exact search
"Vector rescoring has same ordering as knn, same scoring as exact search for kNN section":
- requires:
reason: 'Quantized vector rescoring is required'
test_runner_features: [capabilities]
capabilities:
- method: GET
path: /_search
capabilities: [knn_quantized_vector_rescore]
- skip:
features: "headers"

# kNN search
- do:
headers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,13 @@ setup:
- match: { hits.hits.2._id: "3"}
---
"Vector rescoring has same ordering as knn, same scoring as exact search for kNN section":
- requires:
reason: 'Quantized vector rescoring is required'
test_runner_features: [capabilities]
capabilities:
- method: GET
path: /_search
capabilities: [knn_quantized_vector_rescore]
- skip:
features: "headers"
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ setup:
- match: { hits.hits.2._id: "1" }
---
"Vector rescoring has similar ordering as knn, same scoring as exact search for kNN section":
- requires:
reason: 'Quantized vector rescoring is required'
test_runner_features: [capabilities]
capabilities:
- method: GET
path: /_search
capabilities: [knn_quantized_vector_rescore]
- skip:
features: "headers"
- do:
Expand Down Expand Up @@ -147,6 +154,7 @@ setup:
Content-Type: application/json
search:
rest_total_hits_as_int: true
index: bbq_flat
body:
query:
script_score:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,13 @@ setup:
vector: [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
---
"Vector rescoring has same ordering as knn, same scoring as exact search for kNN section":
- requires:
reason: 'Quantized vector rescoring is required'
test_runner_features: [capabilities]
capabilities:
- method: GET
path: /_search
capabilities: [knn_quantized_vector_rescore]
- skip:
features: "headers"
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@ setup:
- lte: {hits.hits.2._score: 0.791}
---
"Vector rescoring has same ordering as knn, same scoring as exact search for kNN section":
- requires:
reason: 'Quantized vector rescoring is required'
test_runner_features: [capabilities]
capabilities:
- method: GET
path: /_search
capabilities: [knn_quantized_vector_rescore]
- skip:
features: "headers"
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private SearchCapabilities() {}
private static final String MULTI_DENSE_VECTOR_SCRIPT_MAX_SIM = "multi_dense_vector_script_max_sim_with_bugfix";

private static final String RANDOM_SAMPLER_WITH_SCORED_SUBAGGS = "random_sampler_with_scored_subaggs";
private static final String KNN_QUANTIZED_VECTOR_RESCORE = "knn_quantized_vector_rescore";

public static final Set<String> CAPABILITIES;
static {
Expand All @@ -55,6 +56,7 @@ private SearchCapabilities() {}
capabilities.add(TRANSFORM_RANK_RRF_TO_RETRIEVER);
capabilities.add(NESTED_RETRIEVER_INNER_HITS_SUPPORT);
capabilities.add(RANDOM_SAMPLER_WITH_SCORED_SUBAGGS);
capabilities.add(KNN_QUANTIZED_VECTOR_RESCORE);
if (MultiDenseVectorFieldMapper.FEATURE_FLAG.isEnabled()) {
capabilities.add(MULTI_DENSE_VECTOR_FIELD_MAPPER);
capabilities.add(MULTI_DENSE_VECTOR_SCRIPT_ACCESS);
Expand Down

0 comments on commit 0d77521

Please sign in to comment.