# \[Hadoop\]\[pig\] How to set the document id in ESStorage?

**URL:** <https://discuss.elastic.co/t/hadoop-pig-how-to-set-the-document-id-in-esstorage/19569>\
**Category:** Elasticsearch\
**Created:** [September 2, 2014, 8:24am UTC](https://discuss.elastic.co/t/hadoop-pig-how-to-set-the-document-id-in-esstorage/19569 "2014-09-02T08:24:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arokia\_Daniel\_Arokia](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Arokia\_Daniel\_Arokia](https://discuss.elastic.co/u/Arokia_Daniel_Arokia)\
**Post date:** [September 2, 2014, 8:24am UTC](https://discuss.elastic.co/t/hadoop-pig-how-to-set-the-document-id-in-esstorage/19569/1 "2014-09-02T08:24:49Z")

</div>

Hi,

I've been doing some Aggregation functional using the ES STORE and  
Hadoop-PIG functionality . I want to store the aggregated data in  
Elasticsearch through PIG. While storing the data , elasticsearch generates  
document id automatically. Is there a way to set document id manually in  
run time?

A simple working example would really help me out.

This page not working for me :  
[http://elasticsearch-users.115913.n3.nabble.com/Hadoop-pig-How-to-set-the-document-id-td4045260.html](http://elasticsearch-users.115913.n3.nabble.com/Hadoop-pig-How-to-set-the-document-id-td4045260.html)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [September 2, 2014, 11:17am UTC](https://discuss.elastic.co/t/hadoop-pig-how-to-set-the-document-id-in-esstorage/19569/2 "2014-09-02T11:17:24Z")

</div>

You can through the 'es.mapping.id' parameter; see [1]

Cheers,

[1] [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/configuration.html#_mapping)

On 9/2/14 11:24 AM, Arokia Daniel Arokiadoss wrote:

> Hi,
> 
> I've been doing some Aggregation functional using the ES STORE and Hadoop-PIG functionality . I want to store the  
> aggregated data in Elasticsearch through PIG. While storing the data , elasticsearch generates document id  
> automatically. Is there a way to set document id manually in run time?
> 
> A simple working example would really help me out.
> 
> This page not working for me :  
> [http://elasticsearch-users.115913.n3.nabble.com/Hadoop-pig-How-to-set-the-document-id-td4045260.html](http://elasticsearch-users.115913.n3.nabble.com/Hadoop-pig-How-to-set-the-document-id-td4045260.html)
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Costin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5405A744.4070509%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/5405A744.4070509%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Arokia\_Daniel\_Arokia](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Arokia\_Daniel\_Arokia](https://discuss.elastic.co/u/Arokia_Daniel_Arokia)\
**Post date:** [September 3, 2014, 6:26am UTC](https://discuss.elastic.co/t/hadoop-pig-how-to-set-the-document-id-in-esstorage/19569/3 "2014-09-03T06:26:11Z")

</div>

Yep.Working good for me 🙂 Thanks.

On Tuesday, September 2, 2014 4:47:41 PM UTC+5:30, Costin Leau wrote:

> You can through the 'es.mapping.id' parameter; see [1]
> 
> Cheers,
> 
> [1]  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/configuration.html#_mapping)
> 
> On 9/2/14 11:24 AM, Arokia Daniel Arokiadoss wrote:
> 
> > Hi,
> > 
> > I've been doing some Aggregation functional using the ES STORE and  
> > Hadoop-PIG functionality . I want to store the  
> > aggregated data in Elasticsearch through PIG. While storing the data ,  
> > elasticsearch generates document id  
> > automatically. Is there a way to set document id manually in run time?
> > 
> > A simple working example would really help me out.
> > 
> > This page not working for me :
> 
> [http://elasticsearch-users.115913.n3.nabble.com/Hadoop-pig-How-to-set-the-document-id-td4045260.html](http://elasticsearch-users.115913.n3.nabble.com/Hadoop-pig-How-to-set-the-document-id-td4045260.html)
> 
> > --  
> > You received this message because you are subscribed to the Google  
> > Groups "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send  
> > an email to  
> > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\> \<mailto:  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) \<javascript:\>\>.  
> > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com)
> 
> > \<  
> > [https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/acb4687e-fea4-476f-879f-0cfbd6ea1ab9%40googlegroups.com?utm_medium=email&utm_source=footer)\>.
> 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Costin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a7dbc173-5e05-4741-b359-ab9921c38987%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a7dbc173-5e05-4741-b359-ab9921c38987%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:04am UTC](https://discuss.elastic.co/t/hadoop-pig-how-to-set-the-document-id-in-esstorage/19569/4 "2017-07-06T01:04:44Z")

</div>


