output field has been removed from ElasticSearch in version 5, now _source filed is returned with a sentence. An example is shown below.
Mapping
{ "user": { "properties": { "name": { "type": "string" }, "suggest": { "type": "completion", "analyzer": "simple", "search_analyzer": "simple" } } } }
Data
{ "id": "123", "name": "Abc", "suggest": { "input": "Abc::123" }, "output": "Abc::123" }
Query
POST - http: // localhost: 9200 / user * / _ suggest? pretty
{ "type-suggest": { "text": "Abc", "completion": { "field": "suggest" } } }
source share