# Highlighting of Keywords

**URL:** <https://discuss.elastic.co/t/highlighting-of-keywords/31601>\
**Category:** Elasticsearch\
**Created:** [October 5, 2015, 2:35am UTC](https://discuss.elastic.co/t/highlighting-of-keywords/31601 "2015-10-05T02:35:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saielastic](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@saielastic](https://discuss.elastic.co/u/saielastic)\
**Post date:** [October 5, 2015, 2:35am UTC](https://discuss.elastic.co/t/highlighting-of-keywords/31601/1 "2015-10-05T02:35:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [October 5, 2015, 3:01am UTC](https://discuss.elastic.co/t/highlighting-of-keywords/31601/2 "2015-10-05T03:01:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![saielastic](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@saielastic](https://discuss.elastic.co/u/saielastic)\
**Post date:** [October 7, 2015, 1:09pm UTC](https://discuss.elastic.co/t/highlighting-of-keywords/31601/3 "2015-10-07T13:09:59Z")

</div>

Thanks Nik!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:46pm UTC](https://discuss.elastic.co/t/highlighting-of-keywords/31601/4 "2017-07-05T23:46:10Z")

</div>


