Migrate parent-child documents from ES 1.5.2 to 2.3

Hi,
I am writing a python script to migrate all our docs from 1.5.2 cluster to 2.3 cluster. I am using my own script because we have to change the parent docs, due to fields with dots and some more mapping changes, and also because we are using 2 clusters to do it. I have a question regarding the children docs:
What is the best way to migrate children documents which have only mapping changes? -

  1. For each parent doc, change it to fit 2.3, index it to the new cluster, search for its children in the old cluster and index them also to the new one using the bulk API that will have 0-100 documents

  2. Take all parent docs, change them, index them all and only when done index all children using the bulk API that will have default number of docs

Thanks!

Hi,
you should be able to index all documents independently. There should be no need to index parents first and then the children. Children documents can be indexed as orphans. Or maybe I am misunderstanding the question?

Cool! I didn't know that. So, If I index in new cluster, an orphan child (with specified parent ID that not exist yet) and later on its parent, I will not get any errors? And when finish to re-index all, searching for parent with child will return results as usual?

Thanks!

Yes, that should work. Try it out and come back here if you run into an issue.

Thanks! I will do that.