I am handling how to find the
primary key of data in ES index. I know that ES has
_id to represent each document's unique id, but the problem is that when I handling the data which has been stored in ES, the data may be exported from RDB like MySQL. How can I get the primary key in this situation?
Any help will be appreciated!
Elasticsearch does not have a concept of primary key. The only thing that uniquely identifies a document is the index together with the id. I would recommend setting the document id to the primary key when indexing from a relational database.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.