# Index only first N words of field?

**URL:** <https://discuss.elastic.co/t/index-only-first-n-words-of-field/191620>\
**Category:** Elasticsearch\
**Created:** [July 22, 2019, 11:15am UTC](https://discuss.elastic.co/t/index-only-first-n-words-of-field/191620 "2019-07-22T11:15:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gavenkoa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gavenkoa/32/23899_2.png) [@gavenkoa](https://discuss.elastic.co/u/gavenkoa)\
**Post date:** [July 22, 2019, 11:15am UTC](https://discuss.elastic.co/t/index-only-first-n-words-of-field/191620/1 "2019-07-22T11:15:39Z")

</div>

Sometimes we save XML dumps into app logs.

They can be 10kb-100kb long and we are not interested in indexing full content.

Is it possible to limit indexing to only first 1kb on text?

We are only interesting in "\_source" to read original content for long documents.

[https://www.elastic.co/guide/en/elasticsearch/reference/master/ignore-above.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/ignore-above.html) is not accepted in my ES 5.6 pattern mapping. Docs description is confusing (looks like field is comletely ignored instead of partially covered by index).

---

<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 19, 2019, 11:28am UTC](https://discuss.elastic.co/t/index-only-first-n-words-of-field/191620/3 "2019-08-19T11:28:36Z")

</div>

Closed on August 19, 2019, 11:28am UTC

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