Can I define an ID like this when adding data?

Hello,

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:

eb87b79d-798f-4049-9a1a-1e42780ee748.2064.e9107612-144b-4faf-807a-8d991ed166e8.503

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.
Thanks

You can but it may not be ideal, see http://blog.mikemccandless.com/2014/05/choosing-fast-unique-identifier-uuid.html

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.