elastic/elasticsearch

Phrase suggester with suggest_mode: "missing" across multiple indexes yields suggestions when results exist in one index

Open

#7472 opened on Aug 27, 2014

View on GitHub
 (17 comments) (1 reaction) (0 assignees)Java (76,700 stars) (25,882 forks)batch import
:Search Relevance/Suggesters>enhancementTeam:Search Relevancegood first issuehelp wanted

Description

I have found a few odd cases where the phrase suggester with suggest_mode: "missing" generates a suggestion even though the query returns results. I am querying across two indexes but the query term only exists in one of the indexes. I get the search results I expect, but I do not expect to get a suggestion.

I am trying to come up with a curl recreation but I haven't been able to reproduce it yet in a smaller corpus.

I believe what is happening is that the phrase suggestions are getting merged together in the same way the query results are merged together across multiple indexes. If I have query results from test_1 and no results from test_2, then I expect to see results from test_1. But if I have a suggestion from test_1 and no suggestion from test_2 (due to suggest_mode: "missing"), I do not expect to see a suggestion.

Contributor guide