This repository was archived by the owner on Jun 20, 2023. It is now read-only.
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
Define the _id field as id for an object #7
Closed
Description
Actually, I have to implement my own json parser to handle the elasticsearch json because I want to use the _id as value for my object's variable id. For me, it's the easy way to have an auto-increment id from elasticsearch that I can use as identifier for my doc.
The other way is :
- create the document form java
- get the latest id by sending a request to ES server
- insert the id into the document
- index the doc into ES
Here a good example to do so by using the _version as auto-increment : http://blogs.perl.org/users/clinton_gormley/2011/10/elasticsearchsequence---a-blazing-fast-ticket-server.html
Metadata
Metadata
Assignees
Labels
No labels