# Very long highlighted snippets with some 'query\_string' queries

**URL:** <https://discuss.elastic.co/t/very-long-highlighted-snippets-with-some-query-string-queries/7931>\
**Category:** Elasticsearch\
**Created:** [May 31, 2012, 2:56pm UTC](https://discuss.elastic.co/t/very-long-highlighted-snippets-with-some-query-string-queries/7931 "2012-05-31T14:56:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omar\_Khan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omar_khan/32/2870_2.png) [@Omar\_Khan](https://discuss.elastic.co/u/Omar_Khan)\
**Post date:** [May 31, 2012, 2:56pm UTC](https://discuss.elastic.co/t/very-long-highlighted-snippets-with-some-query-string-queries/7931/1 "2012-05-31T14:56:36Z")

</div>

When running a 'query\_string' query containing quotes, e.g. "goodluck  
jonathan", highlighted snippets are often very long. It seems that the  
snippetting starts in the right place but doesn't close properly, pulling  
in the rest of the field. Here is a recreation script that illustrates the  
problem: [https://gist.github.com/2843912](https://gist.github.com/2843912)

What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![Keeper](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keeper/32/1734_2.png) [@Keeper](https://discuss.elastic.co/u/Keeper)\
**Post date:** [March 12, 2014, 12:45pm UTC](https://discuss.elastic.co/t/very-long-highlighted-snippets-with-some-query-string-queries/7931/2 "2014-03-12T12:45:03Z")

</div>

I'm experiencing the same problem. Elasticsearch 0.90.12.  
Don't you know, will the issue be fixed somewhen?

---

<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, 1:43am UTC](https://discuss.elastic.co/t/very-long-highlighted-snippets-with-some-query-string-queries/7931/3 "2017-07-06T01:43:49Z")

</div>


