Elastic 2.3.0 Highlighting

I can't get highlight to work for me. I am doing a query_string search with highlight set for "*" and I am not getting the highlight property on the JSON response. Here is the command I am running:

curl -XPOST 'http://localhost:9200/table/_search?pretty=true' -d '{"query":{"query_string":{"query":"sap"}}, "highlight":{"fields":{"*":{}}}}'

Note I do not have store set to true in the mapping for any of the fields but it is my understanding that highlighting should use the _source field in this case.


You'll want to have a look at require_field_match when using the _all field like you are probably doing. I know you don't explicitly say you are using _all, but it is the default for query_string if you haven't set a list of fields.

Excellent! That did the trick.

Thanks Nik