# Elsticsearch5.6.\*:\_id is not configurable

**URL:** https://discuss.elastic.co/t/elsticsearch5-6-id-is-not-configurable/115496
**Category:** Elasticsearch
**Created:** [January 15, 2018, 8:39am UTC](https://discuss.elastic.co/t/elsticsearch5-6-id-is-not-configurable/115496 "2018-01-15T08:39:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![xiaoxiami](https://avatars.discourse-cdn.com/v4/letter/x/47e85d/32.png) [@xiaoxiami](https://discuss.elastic.co/u/xiaoxiami)
#### Post date: [January 15, 2018, 8:39am UTC](https://discuss.elastic.co/t/elsticsearch5-6-id-is-not-configurable/115496/1 "2018-01-15T08:39:38Z")

</div>

Hi,all  
It told me "\_id is not configurable" when i ceate index by assign \_id mapping mainkey od the source.  
create index statement is  
curl -X PUT localhost:9200/test  
{  
"settings" : {  
"number\_of\_shards" : 1,  
"number\_of\_replicas":0  
},  
"mappings" : {  
"test1" : {  
"\_id":{"path":"mainkey"},  
"\_source" : { "enabled" : false },  
"properties" : {  
"mainkey" : { "type" : "string", "index" : "not\_analyzed" }  
}  
}  
}  
}

response is  
{  
"error": {  
"root\_cause": [  
{  
"type": "mapper\_parsing\_exception",  
"reason": "\_id is not configurable"  
}  
],  
"type": "mapper\_parsing\_exception",  
"reason": "Failed to parse mapping [test1]: \_id is not configurable",  
"caused\_by": {  
"type": "mapper\_parsing\_exception",  
"reason": "\_id is not configurable"  
}  
},  
"status": 400  
}

---

<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: [January 15, 2018, 8:55am UTC](https://discuss.elastic.co/t/elsticsearch5-6-id-is-not-configurable/115496/2 "2018-01-15T08:55:44Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

Yes. `_id` is not configurable. You need to provide it when you index your document:

```auto
PUT index/doc/id

```

---

<div class="post-metadata">

### Author: ![xiaoxiami](https://avatars.discourse-cdn.com/v4/letter/x/47e85d/32.png) [@xiaoxiami](https://discuss.elastic.co/u/xiaoxiami)
#### Post date: [January 15, 2018, 9:25am UTC](https://discuss.elastic.co/t/elsticsearch5-6-id-is-not-configurable/115496/3 "2018-01-15T09:25:45Z")

</div>

yeah,i will use markdown next time.Thank your reply.

---

<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: [February 12, 2018, 9:25am UTC](https://discuss.elastic.co/t/elsticsearch5-6-id-is-not-configurable/115496/4 "2018-02-12T09:25:57Z")

</div>

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