Change _id field generation strategy from UUID-strings to long (by means of ES)


I'm wondering if I can change the default behavior for '_id' field generation.

I'd like ES to generate ids, but, instead of Flake-based string UUIDs I would like to get long (incremental, sequential) numbers (represented as strings).

Is that possible?

If yes, then how?
If no, then why?

Thank you in advance.

No, that is not configurable. Trying to assign sequential long identifiers in a highly concurrent and distributed system would also be very tricky and potentially quite slow. If you need them, generate then externally and send with the indexing requests.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.