Hi
I have doubt regarding document id and index id:
1.both are same or both are different.
2.how to set the document id using java API.
Thanks
Hi
I have doubt regarding document id and index id:
1.both are same or both are different.
2.how to set the document id using java API.
Thanks
When you create an index you'll need the name(==index id) or what do
you mean?
When you create a document you can specify the id:
client.prepareIndex("index", "type", "id")
or using bulk api:
BulkRequestBuilder brb = client.prepareBulk();
IndexRequest indexReq =
Requests.indexRequest("index").type("type").id("id").source(source);
brb.add(indexReq);
Peter.
On 3 Nov., 08:27, sam mishra.sam...@gmail.com wrote:
Hi
I have doubt regarding document id and index id:
1.both are same or both are different.
2.how to set the document id using java API.
Thanks
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.