ID Limitations?

I'm currently only experimenting with elasticsearch. Final goal will be to use it for our production data.

While experimenting I came across the fact that you can supply the id yourself. I think this could be very handy as some of the data we have can change over time (to be specific: Only once).

As the data already has an ID (number, counted up) I want to use that. Unfortunately I have to split the data into multiple entries in order to use it in elasticsearch, so I want to append a fixed string to every ID to make it unique. Example:

Given I have data like this:
"id":123, "events":"{ 'A':1, 'B':2, 'C':3}"
I want to split it into
"id":123A, "event":"A", "value":1
"id":123B, "event":"B", "value":2
"id":123C, "event":"C", "value":3

Are there any limitations on the id I have to observe? My "A", "B", "C" is not just one letter but an arbitrary identifier.

I believe you are limited to 512 bytes. So long as you limit your identifier to 400 bytes you should be ok. Though maybe I'd stay under 40 bytes just to keep it smaller. But I wouldn't worry about it too much.

1 Like

I have id like - g27432nam20root09-01-2019 created by combining four value

1 Like

Thanks a lot.

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