Reputation: 1256
The ElasticSearch docs say "The index operation can be executed without specifying the id. In such a case, an id will be generated automatically." Is there any information about how these are generated, and specifically how they're kept unique? Are they monotone increasing in a string comparison over time? Are they allocated as per-node ranges?
Upvotes: 1
Views: 117
Reputation: 217304
As always, the best source of information is the source code itself.
In IndexRequest.java
, we can see that if no ID is provided, the one that is automatically generated is a Base64 encoded time-based UUID (source) whose implementation can be found here. They are essentially Flake IDs.
Upvotes: 3