I know parent/child has been rewritten in ES2.X, and the mapping for the parent type can be added at the same time as the mapping for the child type, but cannot be added before the child type.
But I think it's not logical. In my situation, I cannot create all children types with their parent type mapping at the same time. I really need to create a child type when its parent type is already exist.
There is no workaround for this at the moment. If you want to add a new child mapping pointing to an existing parent mapping then you need to reindex. (the reindex api can make this a bit easier)
I think maybe ES can relax this constraint a bit. Just to understand your use case correctly: you only introduce new child mappings that point to a parent mapping that already has other child mappings? If so then I think this maybe can be allowed.
What ES can't support is adding child mappings that point to a parent mapping that has no other child mappings yet.
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.