Looking for a Better alternative than Highlighting feature with less impact on query time


(Jayaram Alla) #1

I want to know which value matched within the name array for a search query.
Through searching online i found Highlighting can be used by making pre and post tags empty string. is there a better way to do this than Highlighting feature(as i really don't need it highlighted i just need the string it matched) ?
(Another suggestion was : flattening name array which would increase my number documents by ~ 5%)
{
"_id" : "1234",
"name": [
"Mumbai",
"Bombay"
]
}
can we have an estimate of percentage of increase in query time if used highlighting feature.
Which is the best way to do it considering my main objective is min query time.

Background:
using this for autosuggest.
Right now avg query time is around 15~ 20 ms with ~300K records.
i use 3 match queries with ngram, prefix, lowercase analayzers on name field. few filter queries on other fields of the document

EDIT : sample testing of highlight feature has increased the query time by 3X


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.