My issue is similar to this closed topic. I am trying to reindex parent/child documents in ES 5.6 in preparation for an ES 6.x upgrade. I was able to reindex the parent documents without a problem, however when I try to reindex the child documents I keep getting the error [routing] is missing for join field
Below is the code I am using to make the reindex call and as you can see the parent is being specified. I would also like to note that I am sure the mappings are set up correctly bc I was able to index child documents and they were properly joined to their parents. Reindexing is the only place I am having an issue. I think I might be missing something in the script but I am not sure what. Any help would be greatly appreciated.
Tried that as well and I still get the same error. I tried setting it to _parent like below and I also tried setting it to _routing since that is already set in my current index. Both result in the same error as before.
I'm wondering if some of your vuln type documents in the development index are missing the _parent field. That would explain this error. Can you post the document with the ID 123 that's causing the error that you are seeing?
Checked the docs in the development index and they all have parent and routing set correctly. I changed the id to 123 for simplicity but here is the actual doc and the error message together.
As a workaround, try giving the parent documents a different ID when you reindex those, for example parent_18305769100814537 instead of just 18305769100814537. Next, change your script to use that new ID to route the child documents:
Yep, that did the trick! Now I just need to figure out the best way to flip back to the original IDs once everything is reindexed since update_by_query doesn't work with _routing, whomp whomp.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.