Phrase suggester collate_match field erased during result merging #29485
Labels
>bug
:Search Relevance/Suggesters
"Did you mean" and suggestions as you type
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
When using a phrase suggester with a
collate
query andprune
set to true, a suggested phrase may correspond to a successful collate search on only a couple of shards or a single shard. Sinceprune
is enabled, the options from all shards are returned, even if failing the collate query.When suggester options are merged at the end of a query, only the scores of the options are considered. The
collate_match
field values are ignored. This means that the suggester only reports that thecollate_match
is true for options returned from the first suggester result seen. This is mostly a problem in cases where suggested phrase is one that results in a rare hit.It is only possible to see these false negatives in the result list when
prune
is enabled. Withoutprune
enabled, the suggester will return the correct results, as the only suggestion options that are returned are those that pass the collate query.https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/search/suggest/Suggest.java#L744
The text was updated successfully, but these errors were encountered: