# Does increasing index.highlight.max\_analyzed\_offset to a larger number hurt query performance? If so, how much, and why?

**URL:** <https://discuss.elastic.co/t/does-increasing-index-highlight-max-analyzed-offset-to-a-larger-number-hurt-query-performance-if-so-how-much-and-why/197202>\
**Category:** Elasticsearch\
**Created:** [August 28, 2019, 7:33pm UTC](https://discuss.elastic.co/t/does-increasing-index-highlight-max-analyzed-offset-to-a-larger-number-hurt-query-performance-if-so-how-much-and-why/197202 "2019-08-28T19:33:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesserwright](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jesserwright](https://discuss.elastic.co/u/jesserwright)\
**Post date:** [August 28, 2019, 7:33pm UTC](https://discuss.elastic.co/t/does-increasing-index-highlight-max-analyzed-offset-to-a-larger-number-hurt-query-performance-if-so-how-much-and-why/197202/1 "2019-08-28T19:33:14Z")

</div>

When I do a query for to my index, I am getting the following error:

"The length of [field\_21] field of [82213] doc of [jobs] index has exceeded [10000] - maximum allowed to be analyzed for highlighting. This maximum can be set by changing the [index.highlight.max\_analyzed\_offset] index level setting. For large texts, indexing with offsets or term vectors is recommended!"

When I increase the max\_analyzed\_offset from 10,000 to 10,000,000, it solves my problem, and the queries are equally as fast. Should I be worried about leaving this setting like this? Would I hit a performance drop off? Or should I use offsets / term vectors? One caveat with using the term vectors, is that they increase the size of the index.

Also, is there a way to disable the highlighting if it contains more than a particular number of characters?

---

<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:** [September 25, 2019, 7:33pm UTC](https://discuss.elastic.co/t/does-increasing-index-highlight-max-analyzed-offset-to-a-larger-number-hurt-query-performance-if-so-how-much-and-why/197202/2 "2019-09-25T19:33:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
