I want consistent results to be highlighted. This works for me if I mention the name of the field and returns the selected text, however, if I specify the field as "_all", it does not return any value. This works for me:
curl -XGET "http://localhost:9200/my_index/my_type/_search?q=stackoverflow&size=999" -d '{ "highlight":{ "fields":{ "my_field":{} } } }'
This returns the expected value as follows: [highlight] => stdClass Object ([my_field] => Array ([0] => stackoverflow is the best site for technicians))
But when I give this:
curl -XGET "http://localhost:9200/my_index/my_type/_search?q=stackoverflow&size=999" -d '{ "highlight":{ "fields":{ "_all":{} } } }'
I get a null value / no result.
[highlight] => stdClass Object ( [_all] => Array () )
How can I make it work in any field so as not to mention the field name?
elasticsearch lucene
Ninja
source share