I am trying to highlight the results of a query as follows:
{
"size": 1,
"_source": "longDescription",
"query" : {
"query_string": {"query": "desert"}
},
"highlight" : {
"fields" : {"longDescription" : {}}
}
}
But it produces an empty list of highlights. Yet, if I write the query as follows, I do get highlights:
{
"size": 1,
"_source": "longDescription",
"query" : {
"match": { "longDescription": "desert" }
},
"highlight" : {
"fields" : {"longDescription" : {}}
}
}
What am I doing wrong?
Thx.
Alain Désilets