From 2b8d9df0efd55a266b96bd73f9f788c2dbed4ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Cea=20Fontenla?= Date: Thu, 19 Jun 2025 19:13:17 +0200 Subject: [PATCH] [ESQL] Fix match phrase tests not being deterministic (#129724) Closes https://github.com/elastic/elasticsearch/issues/129676 --- muted-tests.yml | 3 --- .../testFixtures/src/main/resources/scoring.csv-spec | 10 ++++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 7363f92a1cf8..f8698adf4d96 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -565,9 +565,6 @@ tests: - class: org.elasticsearch.test.apmintegration.TracesApmIT method: testApmIntegration issue: https://github.com/elastic/elasticsearch/issues/129651 -- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT - method: test {scoring.TestMatchPhraseWithScoreBoost ASYNC} - issue: https://github.com/elastic/elasticsearch/issues/129676 - class: org.elasticsearch.search.query.RescoreKnnVectorQueryIT method: testKnnSearchRescore issue: https://github.com/elastic/elasticsearch/issues/129713 diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/scoring.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/scoring.csv-spec index 90a92a658a49..2ae56c643b83 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/scoring.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/scoring.csv-spec @@ -567,11 +567,12 @@ required_capability: metadata_score from books metadata _score | where match_phrase(title, "J. R. R. Tolkien") | keep book_no, title, author, _score +| sort _score desc ; book_no:keyword | title:text | author:text | _score:double - 5335 | Letters of J R R Tolkien | J.R.R. Tolkien | 9.017186164855957 - 2130 | The J. R. R. Tolkien Audio Collection | [Christopher Tolkien, John Ronald Reuel Tolkien] | 8.412636756896973 + 5335 | Letters of J R R Tolkien | J.R.R. Tolkien | 9.017186164855957 + 2130 | The J. R. R. Tolkien Audio Collection | [Christopher Tolkien, John Ronald Reuel Tolkien] | 8.412636756896973 ; testMatchPhraseWithScoreBoost @@ -580,9 +581,10 @@ required_capability: match_phrase_function from books metadata _score | where match_phrase(title, "J. R. R. Tolkien", {"boost": 5}) | keep book_no, title, author, _score +| sort _score desc ; book_no:keyword | title:text | author:text | _score:double - 5335 | Letters of J R R Tolkien | J.R.R. Tolkien | 45.0859260559082 - 2130 | The J. R. R. Tolkien Audio Collection | [Christopher Tolkien, John Ronald Reuel Tolkien] | 42.06318283081055 + 5335 | Letters of J R R Tolkien | J.R.R. Tolkien | 45.0859260559082 + 2130 | The J. R. R. Tolkien Audio Collection | [Christopher Tolkien, John Ronald Reuel Tolkien] | 42.06318283081055 ;