# Python Elasticsearch create index mapping

**URL:** <https://discuss.elastic.co/t/python-elasticsearch-create-index-mapping/235709>\
**Category:** Elasticsearch\
**Created:** [June 4, 2020, 8:54am UTC](https://discuss.elastic.co/t/python-elasticsearch-create-index-mapping/235709 "2020-06-04T08:54:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vignesh\_Sureshbabu\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vignesh_sureshbabu_k/32/45342_2.png) [@Vignesh\_Sureshbabu\_K](https://discuss.elastic.co/u/Vignesh_Sureshbabu_K)\
**Post date:** [June 4, 2020, 8:54am UTC](https://discuss.elastic.co/t/python-elasticsearch-create-index-mapping/235709/1 "2020-06-04T08:54:48Z")

</div>

I am trying to create a ES index with custom mapping with elasticsearch python to increase the size of text in each document:

```auto
mapping = {"mapping":{
           "properties":{
             "Apple":{"type":"text","ignore_above":1000},
             "Mango":{"type":"text","ignore_above":1000}
           }
          }}

```

Creation:

```auto
from elasticsearch import Elasticsearch
es1 = Elasticsearch([{"host":"localhost","port":9200}])
es1.indices.create(index="hello",body=mapping)

```

Error:

```auto
RequestError: RequestError(400, 'mapper_parsing_exception', 'Mapping definition for [Apple] has unsupported parameters: [ignore_above : 10000]') 

```

Any suggestions on how to rectify this will be great.

---

<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 2, 2020, 8:54am UTC](https://discuss.elastic.co/t/python-elasticsearch-create-index-mapping/235709/2 "2020-07-02T08:54:54Z")

</div>

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