Elastic 5 suggester output normalization


Previously we used output option to normalize suggestion query results as following:

  city_suggestion:     {input: [city], weight: 1},
  district_suggestion: {input: [district], output: city + ' ' + district, weight: 10},

So, if district matched it was returned together with a city, but now, since output option was dropped, are we expected to move this logic to the application layer or stick with 2.x branch? :smile:

Citing https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_50_suggester.html

As suggestions are document-oriented, suggestion metadata (e.g. output) should now be specified as a field in the document. The support for specifying output when indexing suggestion entries has been removed. Now suggestion result entry’s text is always the un-analyzed value of the suggestion’s input (same as not specifying output while indexing suggestions in pre-5.0 indices).

Hope this helps,

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.