[Test] Don't expect specific scores in docs tests (#54297)

The failing suggester documentation test was expecting specific scores in the
test response, which is fragile implementation details that e.g. can change with
different lucene versions and generally shouldn't be done in documentation test.
Instead we usually replace the float values in the output response by the ones
in the actual response.

Closes #54257
This commit is contained in:
Christoph Büscher 2020-03-27 10:23:16 +01:00
parent d40afc7871
commit f7ea794312
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ In the response, the suggester names will be changed to respectively `term#my-fi
}
--------------------------------------------------
// TESTRESPONSE[s/\.\.\./"took": "$body.took", "timed_out": false, "_shards": "$body._shards", "hits": "$body.hits"/]
// TESTRESPONSE[s/"score": 0.8333333/"score": $body.suggest.term#my-first-suggester.2.options.0.score/]
// TESTRESPONSE[s/"score": 0.030227963/"score": $body.suggest.phrase#my-second-suggester.0.options.0.score/]
<1> The name `my-first-suggester` now contains the `term` prefix.
<2> The name `my-second-suggester` now contains the `phrase` prefix.