# Is there a way to let elasticsearch-hadoop auto-generate doc id?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-let-elasticsearch-hadoop-auto-generate-doc-id/44127>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [March 11, 2016, 8:46am UTC](https://discuss.elastic.co/t/is-there-a-way-to-let-elasticsearch-hadoop-auto-generate-doc-id/44127 "2016-03-11T08:46:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mint](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mint](https://discuss.elastic.co/u/mint)\
**Post date:** [March 11, 2016, 8:46am UTC](https://discuss.elastic.co/t/is-there-a-way-to-let-elasticsearch-hadoop-auto-generate-doc-id/44127/1 "2016-03-11T08:46:09Z")

</div>

I'm using elasticsearch-hadoop-2.2.0 running against hadoop 2.4.1, if not specifying "[es.mapping.id](http://es.mapping.id)", it throws following exception:  
16/03/11 16:30:56 INFO mapreduce.Job: Task Id : attempt\_1452685769492\_240664\_r\_000000\_2, Status : FAILED  
Error: org.elasticsearch.hadoop.rest.EsHadoopInvalidRequest: id must not be null  
at org.elasticsearch.hadoop.rest.RestClient.checkResponse(RestClient.java:467)  
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:425)  
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:415)  
at org.elasticsearch.hadoop.rest.RestClient.bulk(RestClient.java:145)  
at org.elasticsearch.hadoop.rest.RestRepository.tryFlush(RestRepository.java:225)  
at org.elasticsearch.hadoop.rest.RestRepository.flush(RestRepository.java:248)  
at org.elasticsearch.hadoop.rest.RestRepository.close(RestRepository.java:267)  
at ...

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [March 12, 2016, 2:24pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-let-elasticsearch-hadoop-auto-generate-doc-id/44127/2 "2016-03-12T14:24:32Z")

</div>

What's your ES mapping ? How do you call ES-Hadoop? [Troubleshooting](https://www.elastic.co/guide/en/elasticsearch/hadoop/master/troubleshooting.html)

---

<div class="post-metadata">

**Author:** ![mint](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mint](https://discuss.elastic.co/u/mint)\
**Post date:** [March 16, 2016, 2:57pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-let-elasticsearch-hadoop-auto-generate-doc-id/44127/3 "2016-03-16T14:57:25Z")

</div>

sorry for late, it works fine. The exception due to my wrong config.

---

<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, 1:25pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-let-elasticsearch-hadoop-auto-generate-doc-id/44127/4 "2017-07-06T13:25:43Z")

</div>


