diff --git a/muted-tests.yml b/muted-tests.yml index e8daf3fdd1d2f..468e3bac19dbc 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -387,9 +387,6 @@ tests: - class: org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleServiceIT method: testLifecycleAppliedToFailureStore issue: https://github.com/elastic/elasticsearch/issues/124999 -- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT - method: test {p0=search/610_function_score/Random} - issue: https://github.com/elastic/elasticsearch/issues/125010 - class: org.elasticsearch.xpack.ilm.DataStreamAndIndexLifecycleMixingTests method: testGetDataStreamResponse issue: https://github.com/elastic/elasticsearch/issues/125083 diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/610_function_score.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/610_function_score.yml index 71591e13fd29a..53db9894c42d9 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/610_function_score.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/610_function_score.yml @@ -71,13 +71,55 @@ } }, "random_score": { - "seed": 10 + "seed": 10, + "field": "uuid" } } - length: { hits.hits: 2 } - match: { hits.total.value: 2 } +--- +"No field only runs on 9.x": + - requires: + cluster_features: [ "gte_v9.0.0" ] + reason: "empty field works seamlessly (relying on _seqno since 9.x)" + - do: + indices.create: + index: test + body: + mappings: + properties: + text: + type: text + + - do: + index: + index: test + id: "1" + body: { text: "foo bar", uuid: 1234 } + + - do: + index: + index: test + id: "2" + body: { text: "high bar", uuid: 5678 } + + - do: + index: + index: test + id: "3" + body: { text: "raise bar", uuid: 9012 } + + - do: + index: + index: test + id: "3" + body: { text: "raise hands", uuid: 3456 } + + - do: + indices.refresh: + index: [ test ] - do: search: index: test @@ -91,10 +133,8 @@ } }, "random_score": { - "seed": 10, - "field": "uuid" + "seed": 10 } } - - length: { hits.hits: 2 } - match: { hits.total.value: 2 }