I want the matched results to be highlighted. This works for me if I mention the field name and it returns the highlighted text, however if I give the field as \"_all\", it
_all
An alternative quick fix: use * instead of _all:
*
curl -XGET "http://localhost:9200/my_index/my_type/_search?q=stackoverflow&size=999" -d '{ "highlight":{ "fields":{ "*":{} } } }'