Providing index Id while indexing data from HDFS to elasticsearch Index


I am trying to index data stored in HDFS to elasticsearch index. I am able
to do it successfully . What my concern is currently the id provided for
each document in index has a random generated alpha number. Is there any
way by which we can assign the id field with a value which will be unique.
Please let me know any solution available for it .

Currently this is how my code goes :-

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

and it directly forms an index like as in the image attached.
I have marked the id field with red marker.
Please suggest any way .


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