ES 8.9.0
With a query having match_phrase_prefix
of just one term, the search returns expected match; with the same query, percolate by id does not return expected match. The same (both search and percolate) work as expected in ES 7.17.7.
Repro steps:
- Create a new index with a
str
field of typetext
and aquery
field of typepercolator
- Index a doc having
{"str":"the quick brown fox jumps over the lazy dog"}
- Perform a _search
{"query":{"match_phrase_prefix":{"str":{"query":"fox"}}}}
to ensure the doc is searchable (wait until, when not) note _id - Index a query
{"query":{"match_phrase_prefix":{"str":{"query":"fox"}}}}
- Percolate by
{"query":{"percolate":{"field":"query","index":"<myindex>","id":"<_id>"}}}
Note:
- When ES 7.17.7 is used, all steps return expected results.
- When ES 8.9.0 is used, all steps except the final step return expected results.
- When ES 8.9.0 is used, without the match_phrase_prefix query or with the query with two-or-more tokens in #4, all steps return expected results.
And, btw, does match_phrase_prefix
support single token in the query? Or does it expect two-or-more? There is no mentioning of this nor any change in behaviour in the hrefs below..
Help is appreciated.. Thanks..