Highlighting of Keywords


(Sai) #1

Hi All,

We are new to Elastic and wanted to get some help on keyword highlighting. I have gone through the highlighting exposed through API, which would allow to highlight fields, but our requirement is we would like to highlight the keywords on page where the user navigates after search, is there a way to find the list of keywords that were used by highlighting API which would include stemming, acronyms, our thought is if get the list, we can use JS function to highlight the content based on this list... or any other suggestions?

Thanks
Sri


(Nik Everett) #2

There isn't a thing for that. It'd be difficult to make one because
stemming goes from unstemmed term to stemmed term, not the other way
around.

You could absolutely reanalyze the page on the fly and do highlighting that
way. I suspect you could do it with the analyze api as it stands right now.

I've heard folks ask for a freestanding highlight api where you don't have
to index the documents, just feed it a document and a query. That isn't
something that exists now though.

Nik


(Sai) #3

Thanks Nik!


(system) #4