Can I define an ID like this when adding data?


I have to add data inside elasticsearch that comes from another tool, the problem is that I have to keep the same ID that comes from this tool inside Elasticsearch because in other situations I have to update it based on this ID. It creates ID like below:


In the elasticsearch documentation, I have the following example putting data inside elasticsearch:

PUT /customer/external/1?pretty
"name": "John Doe"

Can I add data using my big ID like below?

PUT /customer/external/eb87b79d798f40499a1a1e42780ee7482064e9107612144b4faf807a8d991ed166e8503?pretty
"name": "John Doe"

If not, which alternatives I have to solve this problem? Maybe I can query elasticsearch by another field, but I don't know about the performance of this solution.

I really appreciate any help.

You can but it may not be ideal, see

Thank you very much for the support and for the article.

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