# Alternative to highlight to grab matched tokens?

**URL:** <https://discuss.elastic.co/t/alternative-to-highlight-to-grab-matched-tokens/10967>\
**Category:** Elasticsearch\
**Created:** [March 1, 2013, 3:10pm UTC](https://discuss.elastic.co/t/alternative-to-highlight-to-grab-matched-tokens/10967 "2013-03-01T15:10:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Treher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_treher/32/45243_2.png) [@Justin\_Treher](https://discuss.elastic.co/u/Justin_Treher)\
**Post date:** [March 1, 2013, 3:10pm UTC](https://discuss.elastic.co/t/alternative-to-highlight-to-grab-matched-tokens/10967/1 "2013-03-01T15:10:19Z")

</div>

Is there an alternative to highlight to include which tokens matched as  
part of the search? Parsing this out of the highlighted results is  
functional, but it seems like unnecessary overhead. In addition, highlight  
does not work with custom\_score or boosting queries (yet[https://github.com/elasticsearch/elasticsearch/issues/1314](https://github.com/elasticsearch/elasticsearch/issues/1314)  
).

The obvious use would be for loose matches where you would do the:  
No results for Green Small Widgets  
Showing results for Green Small Widgets

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:48am UTC](https://discuss.elastic.co/t/alternative-to-highlight-to-grab-matched-tokens/10967/2 "2017-07-06T02:48:50Z")

</div>


