Skip to content

Commit c703edd

Browse files
authored
[ESQL] Fix match phrase tests not being deterministic (elastic#129724) (elastic#129755)
Closes elastic#129676
1 parent 2e9bf3c commit c703edd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,12 @@ required_capability: metadata_score
500500
from books metadata _score
501501
| where match_phrase(title, "J. R. R. Tolkien")
502502
| keep book_no, title, author, _score
503+
| sort _score desc
503504
;
504505

505506
book_no:keyword | title:text | author:text | _score:double
506-
5335 | Letters of J R R Tolkien | J.R.R. Tolkien | 9.017186164855957
507-
2130 | The J. R. R. Tolkien Audio Collection | [Christopher Tolkien, John Ronald Reuel Tolkien] | 8.412636756896973
507+
5335 | Letters of J R R Tolkien | J.R.R. Tolkien | 9.017186164855957
508+
2130 | The J. R. R. Tolkien Audio Collection | [Christopher Tolkien, John Ronald Reuel Tolkien] | 8.412636756896973
508509
;
509510

510511
testMatchPhraseWithScoreBoost
@@ -513,9 +514,10 @@ required_capability: match_phrase_function
513514
from books metadata _score
514515
| where match_phrase(title, "J. R. R. Tolkien", {"boost": 5})
515516
| keep book_no, title, author, _score
517+
| sort _score desc
516518
;
517519

518520
book_no:keyword | title:text | author:text | _score:double
519-
5335 | Letters of J R R Tolkien | J.R.R. Tolkien | 45.0859260559082
520-
2130 | The J. R. R. Tolkien Audio Collection | [Christopher Tolkien, John Ronald Reuel Tolkien] | 42.06318283081055
521+
5335 | Letters of J R R Tolkien | J.R.R. Tolkien | 45.0859260559082
522+
2130 | The J. R. R. Tolkien Audio Collection | [Christopher Tolkien, John Ronald Reuel Tolkien] | 42.06318283081055
521523
;

0 commit comments

Comments
 (0)