Skip to content

Commit

Permalink
Add a capability
Browse files Browse the repository at this point in the history
  • Loading branch information
svilen-mihaylov-elastic committed Jan 3, 2025
1 parent eb6725e commit 4ae0be1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ setup:
"Plain highlighter with max_analyzed_offset < -1 should FAIL":

- requires:
cluster_features: ["gte_v7.12.0"]
reason: max_analyzed_offset query param added in 7.12.0
test_runner_features: [capabilities]
capabilities:
- method: GET
path: /_search
capabilities: [ max_analyzed_offset_default ]
reason: Behavior of max_analyzed_offset query param changed in 8.18.

- do:
catch: bad_request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ private SearchCapabilities() {}
private static final String OPTIMIZED_SCALAR_QUANTIZATION_BBQ = "optimized_scalar_quantization_bbq";
private static final String KNN_QUANTIZED_VECTOR_RESCORE = "knn_quantized_vector_rescore";

private static final String MAX_ANALYZED_OFFSET_DEFAULT = "max_analyzed_offset_default";

public static final Set<String> CAPABILITIES;
static {
HashSet<String> capabilities = new HashSet<>();
Expand All @@ -70,6 +72,7 @@ private SearchCapabilities() {}
if (Build.current().isSnapshot()) {
capabilities.add(KQL_QUERY_SUPPORTED);
}
capabilities.add(MAX_ANALYZED_OFFSET_DEFAULT);
CAPABILITIES = Set.copyOf(capabilities);
}
}

0 comments on commit 4ae0be1

Please sign in to comment.