# Highlighter - don't highlight stop words

**URL:** <https://discuss.elastic.co/t/highlighter-dont-highlight-stop-words/38665>\
**Category:** Elasticsearch\
**Created:** [January 7, 2016, 6:43pm UTC](https://discuss.elastic.co/t/highlighter-dont-highlight-stop-words/38665 "2016-01-07T18:43:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Imran\_Azad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/imran_azad/32/4394_2.png) [@Imran\_Azad](https://discuss.elastic.co/u/Imran_Azad)\
**Post date:** [January 7, 2016, 6:43pm UTC](https://discuss.elastic.co/t/highlighter-dont-highlight-stop-words/38665/1 "2016-01-07T18:43:51Z")

</div>

I'm using a stop words filter and when making a query that contains a stop word the highlighter highlights the stop words, is it possible to stop this from happening but to allow the highlighter to continue to highlight if it's a phrase search?

---

<div class="post-metadata">

**Author:** ![double0514](https://avatars.discourse-cdn.com/v4/letter/d/edb3f5/32.png) [@double0514](https://discuss.elastic.co/u/double0514)\
**Post date:** [August 23, 2016, 5:32pm UTC](https://discuss.elastic.co/t/highlighter-dont-highlight-stop-words/38665/2 "2016-08-23T17:32:28Z")

</div>

Try using an analyzer in the "highlight" query:

`"highlight": { "fields": { "text_content": { "fragment_size": 50, "number_of_fragments": 5 } }, "highlight_query": { "bool": { "must": [{ "match": { "content": { "query": "test phrase", "analyzer": "english" } } }] } } }`

---

<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, 10:25pm UTC](https://discuss.elastic.co/t/highlighter-dont-highlight-stop-words/38665/3 "2017-07-05T22:25:48Z")

</div>


