# Issue with higlighting and analyzed tokens

**URL:** <https://discuss.elastic.co/t/issue-with-higlighting-and-analyzed-tokens/20862>\
**Category:** Elasticsearch\
**Created:** [November 20, 2014, 10:14am UTC](https://discuss.elastic.co/t/issue-with-higlighting-and-analyzed-tokens/20862 "2014-11-20T10:14:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![felix\_5](https://avatars.discourse-cdn.com/v4/letter/f/b9bd4f/32.png) [@felix\_5](https://discuss.elastic.co/u/felix_5)\
**Post date:** [November 20, 2014, 10:14am UTC](https://discuss.elastic.co/t/issue-with-higlighting-and-analyzed-tokens/20862/1 "2014-11-20T10:14:01Z")

</div>

Hi,

I am experiencing an unexpected result with highlighting when using an  
\_analyzer path in the mapping and custom analyzers. The highlighting  
returns no result for some query terms, even though the term matches and  
the document is returned. For other query terms it works fine. Somehow it  
seems that for querying and highlighting a different analyzer is used.

See the following commands to reproduce the issue:

> <https://gist.github.com/fxh/3246df167e4d72b0372f>

I am using ES v1.3.4

Thanks for any hint.

Felix

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/22f735a9-edf5-4ac6-a474-aa5e73cf9d74%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/22f735a9-edf5-4ac6-a474-aa5e73cf9d74%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [November 20, 2014, 1:29pm UTC](https://discuss.elastic.co/t/issue-with-higlighting-and-analyzed-tokens/20862/2 "2014-11-20T13:29:47Z")

</div>

I remember there was a github issue about path specified analyzers and  
highlighting but I can't find it. Reading it may be your best bet.

On Thu, Nov 20, 2014 at 5:14 AM, [felix@squirro.com](mailto:felix@squirro.com) wrote:

> Hi,
> 
> I am experiencing an unexpected result with highlighting when using an  
> \_analyzer path in the mapping and custom analyzers. The highlighting  
> returns no result for some query terms, even though the term matches and  
> the document is returned. For other query terms it works fine. Somehow it  
> seems that for querying and highlighting a different analyzer is used.
> 
> See the following commands to reproduce the issue:
> 
> [Failing highlighting example · GitHub](https://gist.github.com/fxh/3246df167e4d72b0372f)
> 
> I am using ES v1.3.4
> 
> Thanks for any hint.
> 
> Felix
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/22f735a9-edf5-4ac6-a474-aa5e73cf9d74%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/22f735a9-edf5-4ac6-a474-aa5e73cf9d74%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/22f735a9-edf5-4ac6-a474-aa5e73cf9d74%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/22f735a9-edf5-4ac6-a474-aa5e73cf9d74%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAPmjWd1TZLQ6L0q4DEq77rfRqBpqF78dehYRUnFEtmZx8j0ANw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd1TZLQ6L0q4DEq77rfRqBpqF78dehYRUnFEtmZx8j0ANw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:48am UTC](https://discuss.elastic.co/t/issue-with-higlighting-and-analyzed-tokens/20862/3 "2017-07-06T00:48:40Z")

</div>


