# Index.mapping.attachment.indexed\_chars how to set

**URL:** <https://discuss.elastic.co/t/index-mapping-attachment-indexed-chars-how-to-set/7979>\
**Category:** Elasticsearch\
**Created:** [June 5, 2012, 11:12am UTC](https://discuss.elastic.co/t/index-mapping-attachment-indexed-chars-how-to-set/7979 "2012-06-05T11:12:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tullio0106](https://avatars.discourse-cdn.com/v4/letter/t/d6d6ee/32.png) [@tullio0106](https://discuss.elastic.co/u/tullio0106)\
**Post date:** [June 5, 2012, 11:12am UTC](https://discuss.elastic.co/t/index-mapping-attachment-indexed-chars-how-to-set/7979/1 "2012-06-05T11:12:49Z")

</div>

I need to set the index.mapping.attachment.indexed\_chars value to the maximum possible but I wasn't able to understand how should I set such value.ù  
Can someone explain me how to set it using Java API ?  
Tks  
Tullio

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 8, 2012, 10:23pm UTC](https://discuss.elastic.co/t/index-mapping-attachment-indexed-chars-how-to-set/7979/2 "2012-06-08T22:23:02Z")

</div>

You can set it to -1 to have no limit. You can set the mentioned setting  
either when you create the index through the Java API in the settings, or  
in the node configuration file.

On Tue, Jun 5, 2012 at 1:12 PM, tullio0106 [tbettinazzi@axioma.it](mailto:tbettinazzi@axioma.it) wrote:

> I need to set the index.mapping.attachment.indexed\_chars value to the  
> maximum  
> possible but I wasn't able to understand how should I set such value.ù  
> Can someone explain me how to set it using Java API ?  
> Tks  
> Tullio
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/index-mapping-attachment-indexed-chars-how-to-set-tp4018830.html](http://elasticsearch-users.115913.n3.nabble.com/index-mapping-attachment-indexed-chars-how-to-set-tp4018830.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![kunbetter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kunbetter/32/2409_2.png) [@kunbetter](https://discuss.elastic.co/u/kunbetter)\
**Post date:** [May 15, 2013, 7:12am UTC](https://discuss.elastic.co/t/index-mapping-attachment-indexed-chars-how-to-set/7979/3 "2013-05-15T07:12:17Z")

</div>

i have set index.mapping.attachment.indexed\_chars: -1 or indexed\_chars: 1 in elasticsearch.yml,but get the same error:Failed to extract [100000] characters of text for [null].

---

<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, 2:36am UTC](https://discuss.elastic.co/t/index-mapping-attachment-indexed-chars-how-to-set/7979/4 "2017-07-06T02:36:40Z")

</div>


