# Highlight subset of characters

**URL:** <https://discuss.elastic.co/t/highlight-subset-of-characters/285370>\
**Category:** Elasticsearch\
**Created:** [September 28, 2021, 2:07pm UTC](https://discuss.elastic.co/t/highlight-subset-of-characters/285370 "2021-09-28T14:07:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tamara](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamara/32/47095_2.png) [@tamara](https://discuss.elastic.co/u/tamara)\
**Post date:** [October 13, 2021, 5:35pm UTC](https://discuss.elastic.co/t/highlight-subset-of-characters/285370/2 "2021-10-13T17:35:24Z")

</div>

Hi Imre,

The highlight does not highlight tokens, instead it highlights the whole word where the token is in. If you want t highlight the token you need to do it by the user interface.

Here is an example how to use the highlight with subset of words ( [ngrams tokenizer](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/analysis-ngram-tokenizer.html) ). Also, a search example.

> <https://gist.github.com/tamros/1927cf97ece62b6da2eda7ec2d525f10>

---

_[View the full topic](https://discuss.elastic.co/t/highlight-subset-of-characters/285370)._
