Skip to content

Commit 16b9590

Browse files
authored
use books dataset to ensure scoring consistency (#119676) (#119727)
1 parent e622195 commit 16b9590

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,26 +92,26 @@ testMultiValuedFieldWithConjunctionWithScore
9292
required_capability: match_function
9393
required_capability: metadata_score
9494

95-
from employees metadata _score
96-
| where match(job_positions, "Data Scientist") and match(job_positions, "Support Engineer")
97-
| keep emp_no, first_name, last_name, job_positions, _score;
95+
from books metadata _score
96+
| where match(author, "Keith Faulkner") and match(author, "Rory Tyger")
97+
| keep book_no, title, author, _score;
9898

99-
emp_no:integer | first_name:keyword | last_name:keyword | job_positions:keyword | _score:double
100-
10043 | Yishay | Tzvieli | [Data Scientist, Python Developer, Support Engineer] | 5.233309745788574
99+
book_no:keyword | title:text | author:text | _score:double
100+
6151 | Pop! Went Another Balloon: A Magical Counting Storybook (Magical Counting Storybooks) | [Keith Faulkner, Rory Tyger] | 8.5822172164917
101101
;
102102

103103
testMatchAndQueryStringFunctionsWithScore
104104
required_capability: match_function
105105
required_capability: metadata_score
106106

107-
from employees metadata _score
108-
| where match(job_positions, "Data Scientist") and qstr("job_positions: (Support Engineer) and gender: F")
109-
| keep emp_no, first_name, last_name, job_positions, _score;
107+
from books metadata _score
108+
| where match(author, "Keith Faulkner") and qstr("author:Rory or author:Beverlie")
109+
| keep book_no, title, author, _score;
110110
ignoreOrder:true
111111

112-
emp_no:integer | first_name:keyword | last_name:keyword | job_positions:keyword | _score:double
113-
10041 | Uri | Lenart | [Data Scientist, Head Human Resources, Internship, Senior Team Lead] | 3.509873867034912
114-
10043 | Yishay | Tzvieli | [Data Scientist, Python Developer, Support Engineer] | 5.233309745788574
112+
book_no:keyword | title:text | author:text | _score:double
113+
3535 | Rainbow's End: A Magical Story and Moneybox | [Beverlie Manson, Keith Faulkner] | 6.5579609870910645
114+
6151 | Pop! Went Another Balloon: A Magical Counting Storybook (Magical Counting Storybooks) | [Keith Faulkner, Rory Tyger] | 5.975414276123047
115115
;
116116

117117
multipleWhereWithMatchScoringNoSort

0 commit comments

Comments
 (0)