Support highlighting with autocomplete operator
Currently, highlighting is supported only with search, term, compound, and span operators, and this is documented in the highlighting documentation. Therefore, if highlighting is used with the autocomplete operator, then it results in an error like this:
"Highlights can not be generated. Path: "####" is not stored statically or dynamically indexed."
This is a feature request to add support for highlighting with the autocomplete operator.
-
Ethan commented
Sample query:
{
"compound": {
"should": [{
"autocomplete": {
"query": "fight",
"path": "plot",
"score": {
"boost": {
"value": 9
}
}
},
}, {
"autocomplete": {
"query": "fight",
"path": "fullplot",
"score": {
"boost": {
"value": 5
}
}
}
}]
},
'highlight': { "path": 'plot' }
}