Skip to content

Commit 602d6f7

Browse files
New capability
1 parent 276bd81 commit 602d6f7

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/multi-match-function.csv-spec

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
multiMatchWithField
6-
required_capability: multi_match_function
6+
required_capability: multi_match_unified_function
77

88
// tag::multi-match-with-field[]
99
FROM books
@@ -25,7 +25,7 @@ book_no:keyword | author:text
2525
;
2626

2727
testMultiMatchWithOptionsFuzziness
28-
required_capability: multi_match_function
28+
required_capability: multi_match_unified_function
2929

3030
from books
3131
| where multi_match(title, description, "Pings", {"fuzziness": 1})
@@ -46,7 +46,7 @@ book_no:keyword
4646
;
4747

4848
testMultiMatchWithOptionsOperator
49-
required_capability: multi_match_function
49+
required_capability: multi_match_unified_function
5050

5151
// tag::multi-match-with-named-function-params[]
5252
FROM books
@@ -61,7 +61,7 @@ The Hobbit or There and Back Again
6161
;
6262

6363
testMultiMatchWithOptionsMinimumShouldMatch
64-
required_capability: multi_match_function
64+
required_capability: multi_match_unified_function
6565

6666
from books
6767
| where multi_match(title, description, "here back again", {"minimum_should_match": 2, "operator": "OR"})
@@ -74,7 +74,7 @@ The Hobbit or There and Back Again
7474
;
7575

7676
testMultiMatchWithNonPushableDisjunctions
77-
required_capability: multi_match_function
77+
required_capability: multi_match_unified_function
7878
required_capability: full_text_functions_disjunctions_compute_engine
7979

8080
from books
@@ -97,7 +97,7 @@ book_no:keyword
9797
;
9898

9999
testMultiMatchPhraseQuery
100-
required_capability: multi_match_function
100+
required_capability: multi_match_unified_function
101101

102102
from books
103103
| where multi_match(title, description, "Lord of the rings", { "type": "phrase" } )
@@ -117,7 +117,7 @@ Return of the King Being the Third Part of The Lord of the Rings
117117
;
118118

119119
testMultiMatchPhrasePrefixQuery
120-
required_capability: multi_match_function
120+
required_capability: multi_match_unified_function
121121

122122
from books
123123
| where multi_match(title, "Lord of the ri", { "type": "phrase_prefix" } )

x-pack/plugin/esql/qa/testFixtures/src/main/resources/scoring.csv-spec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ book_no:keyword | title:text
115115
;
116116

117117
testMultiMatchWithScore
118-
required_capability: multi_match_function
118+
required_capability: multi_match_unified_function
119119
required_capability: metadata_score
120120

121121
from books metadata _score
@@ -128,7 +128,7 @@ book_no:keyword | title:text | author
128128
;
129129

130130
testMultiMatchWithScore1
131-
required_capability: multi_match_function
131+
required_capability: multi_match_unified_function
132132
required_capability: metadata_score
133133

134134
from books metadata _score
@@ -155,7 +155,7 @@ book_no:keyword | _score:double
155155
;
156156

157157
testMultiMatchWithScore2
158-
required_capability: multi_match_function
158+
required_capability: multi_match_unified_function
159159
required_capability: metadata_score
160160

161161
from books metadata _score

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,11 @@ public enum Cap {
937937
*/
938938
MULTI_MATCH_FUNCTION(Build.current().isSnapshot()),
939939

940+
/**
941+
* Support for unified match and multi-match functions.
942+
*/
943+
MULTI_MATCH_UNIFIED_FUNCTION(Build.current().isSnapshot()),
944+
940945
/**
941946
* Do {@code TO_LOWER} and {@code TO_UPPER} process all field values?
942947
*/

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/CsvTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public final void test() throws Throwable {
314314
);
315315
assumeFalse(
316316
"CSV tests cannot currently handle multi_match function that depends on Lucene",
317-
testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.MULTI_MATCH_FUNCTION.capabilityName())
317+
testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.MULTI_MATCH_UNIFIED_FUNCTION.capabilityName())
318318
);
319319

320320
if (Build.current().isSnapshot()) {

0 commit comments

Comments
 (0)