Skip to content

Commit

Permalink
add capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
weizijun committed Jan 23, 2025
1 parent 10f3b1c commit caf5362
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ private SearchCapabilities() {}
/** knn query where k defaults to the request size. */
private static final String K_DEFAULT_TO_SIZE = "k_default_to_size";

/** Support deprecated window_size field in rank. */
private static final String RRF_WINDOW_SIZE_SUPPORT_DEPRECATED = "rrf_window_size_support_deprecated";

private static final String RANDOM_SAMPLER_WITH_SCORED_SUBAGGS = "random_sampler_with_scored_subaggs";
private static final String OPTIMIZED_SCALAR_QUANTIZATION_BBQ = "optimized_scalar_quantization_bbq";
private static final String KNN_QUANTIZED_VECTOR_RESCORE_OVERSAMPLE = "knn_quantized_vector_rescore_oversample";
Expand All @@ -54,6 +57,7 @@ private SearchCapabilities() {}
capabilities.add(MOVING_FN_RIGHT_MATH);
capabilities.add(K_DEFAULT_TO_SIZE);
capabilities.add(KQL_QUERY_SUPPORTED);
capabilities.add(RRF_WINDOW_SIZE_SUPPORT_DEPRECATED);
CAPABILITIES = Set.copyOf(capabilities);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ setup:
"Simple rank with old window_size param":

- requires:
cluster_features: ["gte_v8.16.0"]
reason: "deprecation added in 8.16"
test_runner_features: warnings

capabilities:
- method: POST
path: /_search
capabilities: [ rrf_window_size_support_deprecated ]
test_runner_features: capabilities
reason: "add deprecated field [window_size] in 8.18 to support upgrade"
- do:
warnings:
- "Deprecated field [rank] used, replaced by [retriever]"
Expand Down

0 comments on commit caf5362

Please sign in to comment.