Skip to content

Commit 6f75f30

Browse files
Tweak test
1 parent fbbb7eb commit 6f75f30

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

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

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ required_capability: multi_match_function
77

88
// tag::multi-match-with-field[]
99
FROM books
10-
| WHERE MULTI_MATCH("Faulkner", author, summary, {"fuzziness": 1})
10+
| WHERE MULTI_MATCH("Faulkner", author, description, {"fuzziness": 1})
1111
| KEEP book_no, author
1212
| SORT book_no
1313
| LIMIT 5
@@ -28,23 +28,29 @@ testMultiMatchWithOptionsFuzziness
2828
required_capability: multi_match_function
2929

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

3535
book_no:keyword
36-
2714
37-
2675
38-
4023
39-
7140
36+
1463
37+
2675
38+
2714
39+
2936
40+
4023
41+
4917
42+
5335
43+
7140
44+
7350
45+
8875
4046
;
4147

4248
testMultiMatchWithOptionsOperator
4349
required_capability: multi_match_function
4450

4551
// tag::multi-match-with-named-function-params[]
4652
FROM books
47-
| WHERE MULTI_MATCH("Hobbit Back Again", title, summary, {"operator": "AND"})
53+
| WHERE MULTI_MATCH("Hobbit Back Again", title, description, {"operator": "AND"})
4854
| KEEP title;
4955
// end::multi-match-with-named-function-params[]
5056

@@ -58,10 +64,10 @@ testMultiMatchWithOptionsMinimumShouldMatch
5864
required_capability: multi_match_function
5965

6066
from books
61-
| where multi_match("Hobbit Back Again", title, summary, {"minimum_should_match": 2})
62-
| keep title;
67+
| where multi_match("Hobbit", title, description, {"minimum_should_match": 2, "operator": "OR"})
68+
| keep title, description;
6369

64-
title:text
70+
title:text | description:text
6571
The Hobbit or There and Back Again
6672
;
6773

@@ -70,15 +76,20 @@ required_capability: multi_match_function
7076
required_capability: full_text_functions_disjunctions_compute_engine
7177

7278
from books
73-
| where multi_match("lord", title, summary, {"operator": "AND"}) or length(title) > 130
79+
| where multi_match("lord", title, description, {"operator": "AND"}) or length(title) > 130
7480
| keep book_no
7581
;
7682
ignoreOrder: true
7783

7884
book_no:keyword
79-
2675
80-
2714
81-
4023
82-
7140
83-
8678
85+
1463
86+
2675
87+
2714
88+
2936
89+
4023
90+
5335
91+
7140
92+
7350
93+
8678
94+
8875
8495
;

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ from books metadata _score
123123
| keep book_no, title, author, _score;
124124
ignoreOrder:true
125125

126-
book_no:keyword | title:text | author:text | _score:double
127-
3535 | Rainbow's End: A Magical Story and Moneybox | [Beverlie Manson, Keith Faulkner] | 6.5579609870910645
128-
6151 | Pop! Went Another Balloon: A Magical Counting Storybook (Magical Counting Storybooks) | [Keith Faulkner, Rory Tyger] | 5.975414276123047
126+
book_no:keyword | title:text | author:text | _score:double
127+
2847 | To Love A Dark Stranger (Lovegram Historical Romance) | Colleen Faulkner | 0.0
129128
;
130129

131130
multipleWhereWithMatchScoringNoSort

0 commit comments

Comments
 (0)