# Way to avoid hitting max field length. term\_vectors vs offsets

**URL:** <https://discuss.elastic.co/t/way-to-avoid-hitting-max-field-length-term-vectors-vs-offsets/192390>\
**Category:** Elasticsearch\
**Created:** [July 26, 2019, 8:49am UTC](https://discuss.elastic.co/t/way-to-avoid-hitting-max-field-length-term-vectors-vs-offsets/192390 "2019-07-26T08:49:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk11](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@elk11](https://discuss.elastic.co/u/elk11)\
**Post date:** [July 26, 2019, 8:49am UTC](https://discuss.elastic.co/t/way-to-avoid-hitting-max-field-length-term-vectors-vs-offsets/192390/1 "2019-07-26T08:49:55Z")

</div>

Hi,

We are hitting errors "The length of [some\_field] field of [some\_doc] doc of [index] index has exceeded [10000000] - maximum allowed to be analyzed for highlighting. **For large texts, indexing with offsets or term vectors is recommended!**"

What's better way of storing large fields? I had checked 'offsets' ([https://www.elastic.co/guide/en/elasticsearch/reference/current/index-options.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-options.html)) But I don't understand how it would solve the problem. By it's explanation, when index\_options is set to 'offsets', it seems like it'll index doc number, term freqs, positions, start and end character of offset. But the default is only doc number is indexed.

So how exactly does setting index\_options to 'offsets' help here?

Thanks.

---

<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:** [August 23, 2019, 8:49am UTC](https://discuss.elastic.co/t/way-to-avoid-hitting-max-field-length-term-vectors-vs-offsets/192390/2 "2019-08-23T08:49:55Z")

</div>

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