# Index mapping error

**URL:** <https://discuss.elastic.co/t/index-mapping-error/140224>\
**Category:** Elasticsearch\
**Created:** [July 16, 2018, 10:36pm UTC](https://discuss.elastic.co/t/index-mapping-error/140224 "2018-07-16T22:36:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna2/32/20893_2.png) [@Krishna2](https://discuss.elastic.co/u/Krishna2)\
**Post date:** [July 16, 2018, 10:36pm UTC](https://discuss.elastic.co/t/index-mapping-error/140224/1 "2018-07-16T22:36:51Z")

</div>

I am trying to create index as below. It throws error either thru curl or kibana dev console.

curl -XPUT localhost:9200/fassicountry -d '{  
"settings" : {  
"number\_of\_shards" : 1  
},  
"mappings" : {  
"type1" : {  
"properties" : {  
"STREAM\_OPERATOR" : { "type" : "string", "index" : "fassicountry" }  
}  
}  
}  
-----------error  
Failed to parse mapping [type1]: No handler for type [string] declared on field [STREAM\_OPERATOR]","caused\_by":{"type":"mapper\_parsing\_exception","reason":"No handler for type [string] declared on field [STREAM\_OPERATOR]"}},"status":400

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 16, 2018, 10:52pm UTC](https://discuss.elastic.co/t/index-mapping-error/140224/2 "2018-07-16T22:52:40Z")

</div>

> [@Krishna2](#):
>
> "index" : "fassicountry"

That's not a valid value for the index property, see [index | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-index.html)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 17, 2018, 6:00am UTC](https://discuss.elastic.co/t/index-mapping-error/140224/3 "2018-07-17T06:00:14Z")

</div>

Also use text instead of string

---

<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 14, 2018, 6:00am UTC](https://discuss.elastic.co/t/index-mapping-error/140224/4 "2018-08-14T06:00:16Z")

</div>

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