Get generated document ID when using bulk index

I am using the java high level rest client to do a bulk index of a few million documents from an existing application with data from oracle sql. Each document has it's own primary Id. I am indexing the documents into elastic search and letting ES generate it's own document Ids for optimal spacial locality. I need to create a lookup table in oracle that will map the ES document Id to the primary Id in the sql database.

Is there a way to use the bulk-response of an indexing operation to get the generated ES document Ids so that I can map them to their corresponding oracle primary keys?

Thanks for the help!

I'd use the Oracle Id as the elasticsearch document id.

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