Providing id for each document in Index while indexing data from HDFS to elasticsearch index


I am new to elasticsearch- hadoop . Currently trying to index data stored
in HDFS to elasticsearch index. I am to do that successfully . But while
doing that my only concern is when we index the data by help of code , then
each document is provided with an id field , which is randomly generated.
Is there any way by which we can manually assign the value , which will be
unique ?
Currently I am using the below code to index the data :-

JobConf conf = new JobConf();
conf.set("es.nodes", "es-server:9200");
conf.set("es.resource", "index_name/index_type");

this forms the index in proper manner as shown in the screen shot attached.
Where the id field is marked in red.
So as my concern I want that id field to be manually provided.
Please let me know the solution .


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
To view this discussion on the web visit
For more options, visit