diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/string.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/string.csv-spec index 1801a7bc8e844..22900aea932d9 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/string.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/string.csv-spec @@ -981,6 +981,7 @@ beta | Kubernetes cluster ; startsWithLucenePushdownIgnoreMultivalues +required_capability: starts_with_ends_with_lucene_pushdown from hosts | where starts_with(description, "epsilon") @@ -1266,6 +1267,7 @@ beta | Kubernetes cluster ; endsWithLucenePushdownIgnoreMultivalues +required_capability: starts_with_ends_with_lucene_pushdown from hosts | where ends_with(description, "host") diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java index c9d42f007ffc9..b84858a8fb5af 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java @@ -872,6 +872,12 @@ public enum Cap { */ RRF(Build.current().isSnapshot()), + /** + * Lucene query pushdown to StartsWith and EndsWith functions. + * This capability was created to avoid receiving wrong warnings from old nodes in mixed clusters + */ + STARTS_WITH_ENDS_WITH_LUCENE_PUSHDOWN, + /** * Full text functions can be scored when being part of a disjunction */