diff --git a/docs/reference/query-languages/esql/kibana/definition/functions/match_phrase.json b/docs/reference/query-languages/esql/kibana/definition/functions/match_phrase.json index 128f11042ad0d..603aa08561d6c 100644 --- a/docs/reference/query-languages/esql/kibana/definition/functions/match_phrase.json +++ b/docs/reference/query-languages/esql/kibana/definition/functions/match_phrase.json @@ -59,5 +59,5 @@ "FROM books\n| WHERE MATCH_PHRASE(author, \"William Faulkner\")" ], "preview" : true, - "snapshot_only" : true + "snapshot_only" : false } diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java index ecc9dbd271327..b115eb5c33c6e 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java @@ -466,7 +466,8 @@ private static FunctionDefinition[][] functions() { def(Kql.class, uni(Kql::new), "kql"), def(Match.class, tri(Match::new), "match"), def(MultiMatch.class, MultiMatch::new, "multi_match"), - def(QueryString.class, bi(QueryString::new), "qstr") } }; + def(QueryString.class, bi(QueryString::new), "qstr"), + def(MatchPhrase.class, tri(MatchPhrase::new), "match_phrase") } }; } @@ -486,7 +487,6 @@ private static FunctionDefinition[][] snapshotFunctions() { def(LastOverTime.class, LastOverTime::withUnresolvedTimestamp, "last_over_time"), def(FirstOverTime.class, FirstOverTime::withUnresolvedTimestamp, "first_over_time"), def(Term.class, bi(Term::new), "term"), - def(MatchPhrase.class, tri(MatchPhrase::new), "match_phrase"), def(Knn.class, tri(Knn::new), "knn") } }; } diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/60_usage.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/60_usage.yml index 14cf02e0bdcb3..3aca6d2ff500b 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/60_usage.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/60_usage.yml @@ -130,7 +130,7 @@ setup: - match: {esql.functions.coalesce: $functions_coalesce} - gt: {esql.functions.categorize: $functions_categorize} # Testing for the entire function set isn't feasible, so we just check that we return the correct count as an approximation. - - length: {esql.functions: 157} # check the "sister" test below for a likely update to the same esql.functions length check + - length: {esql.functions: 156} # check the "sister" test below for a likely update to the same esql.functions length check --- "Basic ESQL usage output (telemetry) non-snapshot version": @@ -228,7 +228,7 @@ setup: - gt: {esql.functions.to_long: $functions_to_long} - match: {esql.functions.coalesce: $functions_coalesce} - gt: {esql.functions.categorize: $functions_categorize} - - length: {esql.functions: 145} # check the "sister" test above for a likely update to the same esql.functions length check + - length: {esql.functions: 146} # check the "sister" test above for a likely update to the same esql.functions length check --- took: