June 2017
Beginner to intermediate
404 pages
8h 22m
English
The term suggester is used for a single term. The phrase suggester is used for making suggestions based on a phrase. The phrase suggester builds on the functionality of the term suggester. A simple phrase suggester query would look like the following:
#Phrase Suggester POST chapter7/_search { "suggest" : { "term_suggester" : { "text" : "samsund galaxy", "phrase" : { "field" : "product_name" } } } }
The phrase suggester is very similar to the term suggester; instead of wrapping the field using the term for the phrase suggester, we wrap it using the phrase attribute. The response to the query is as follows:
{ ..... "suggest": { "term_suggester": [ { "text": "samsund galaxy", "offset": 0, "length": 14, "options": [ { Read now
Unlock full access