Skip to content

Commit 67133a6

Browse files
Fix more tests
1 parent 94ed47d commit 67133a6

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
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
@@ -7,7 +7,7 @@ required_capability: multi_match_unified_function
77

88
// tag::multi-match-with-field[]
99
FROM books
10-
| WHERE MULTI_MATCH(author, description, "Faulkner")
10+
| WHERE MATCH(author, description, "Faulkner")
1111
| KEEP book_no, author
1212
| SORT book_no
1313
| LIMIT 5
@@ -28,7 +28,7 @@ testMultiMatchWithOptionsFuzziness
2828
required_capability: multi_match_unified_function
2929

3030
from books
31-
| where multi_match(title, description, "Pings", {"fuzziness": 1})
31+
| where match(title, description, "Pings", {"fuzziness": 1})
3232
| keep book_no;
3333
ignoreOrder:true
3434

@@ -50,7 +50,7 @@ required_capability: multi_match_unified_function
5050

5151
// tag::multi-match-with-named-function-params[]
5252
FROM books
53-
| WHERE MULTI_MATCH(title, description, "Hobbit Back Again", {"operator": "AND"})
53+
| WHERE MATCH(title, description, "Hobbit Back Again", {"operator": "AND"})
5454
| KEEP title;
5555
// end::multi-match-with-named-function-params[]
5656

@@ -64,7 +64,7 @@ testMultiMatchWithOptionsMinimumShouldMatch
6464
required_capability: multi_match_unified_function
6565

6666
from books
67-
| where multi_match(title, description, "here back again", {"minimum_should_match": 2, "operator": "OR"})
67+
| where match(title, description, "here back again", {"minimum_should_match": 2, "operator": "OR"})
6868
| sort book_no
6969
| keep title;
7070

@@ -78,7 +78,7 @@ required_capability: multi_match_unified_function
7878
required_capability: full_text_functions_disjunctions_compute_engine
7979

8080
from books
81-
| where multi_match(title, description, "lord") or length(title) > 130
81+
| where match(title, description, "lord") or length(title) > 130
8282
| keep book_no
8383
;
8484
ignoreOrder: true
@@ -100,7 +100,7 @@ testMultiMatchPhraseQuery
100100
required_capability: multi_match_unified_function
101101

102102
from books
103-
| where multi_match(title, description, "Lord of the rings", { "type": "phrase" } )
103+
| where match(title, description, "Lord of the rings", { "type": "phrase" } )
104104
| keep title
105105
;
106106
ignoreOrder: true
@@ -120,7 +120,7 @@ testMultiMatchPhrasePrefixQuery
120120
required_capability: multi_match_unified_function
121121

122122
from books
123-
| where multi_match(title, "Lord of the ri", { "type": "phrase_prefix" } )
123+
| where match(title, "Lord of the ri", { "type": "phrase_prefix" } )
124124
| keep title
125125
;
126126
ignoreOrder: true

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
@@ -119,7 +119,7 @@ required_capability: multi_match_unified_function
119119
required_capability: metadata_score
120120

121121
from books metadata _score
122-
| where multi_match(author, title, "Mark", {"fuzziness": 1})
122+
| where match(author, title, "Mark", {"fuzziness": 1})
123123
| keep book_no, title, author, _score;
124124
ignoreOrder:true
125125

@@ -132,7 +132,7 @@ required_capability: multi_match_unified_function
132132
required_capability: metadata_score
133133

134134
from books metadata _score
135-
| where multi_match(description, title, "Hobbit", {"type": "best_fields"})
135+
| where match(description, title, "Hobbit", {"type": "best_fields"})
136136
| sort book_no
137137
| eval _score = round(_score)
138138
| keep book_no, _score;
@@ -159,7 +159,7 @@ required_capability: multi_match_unified_function
159159
required_capability: metadata_score
160160

161161
from books metadata _score
162-
| where multi_match(description, title, "Hobbit", {"type": "most_fields"})
162+
| where match(description, title, "Hobbit", {"type": "most_fields"})
163163
| sort book_no
164164
| eval _score = round(_score)
165165
| keep book_no, _score;

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/plugin/ScoringIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
4646
public static List<Object[]> params() {
4747
List<Object[]> params = new ArrayList<>();
4848
params.add(new Object[] { "match(content, \"fox\")" });
49-
params.add(new Object[] { "multi_match(content, \"fox\", {\"operator\": \"AND\"})" });
5049
params.add(new Object[] { "content:\"fox\"" });
5150
params.add(new Object[] { "qstr(\"content: fox\")" });
5251
params.add(new Object[] { "kql(\"content*: fox\")" });

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ public void testQStrOptionsPushDown() {
13171317
public void testMultiMatchOptionsPushDown() {
13181318
String query = """
13191319
from test
1320-
| where MULTI_MATCH(first_name, last_name, "Anna", {"fuzzy_rewrite": "constant_score", "slop": 10, "analyzer": "auto",
1320+
| where MATCH(first_name, last_name, "Anna", {"fuzzy_rewrite": "constant_score", "slop": 10, "analyzer": "auto",
13211321
"auto_generate_synonyms_phrase_query": "false", "fuzziness": "auto", "fuzzy_transpositions": false, "lenient": "false",
13221322
"max_expansions": 10, "minimum_should_match": 3, "operator": "AND", "prefix_length": 20, "tie_breaker": 1.0,
13231323
"type": "best_fields", "boost": 2.0})

0 commit comments

Comments
 (0)