We're attempting to retrieve results from several different Elasticsearch indexes and sort them by a common field. The way we're approaching this is to create a boolean query that is composed of multiple should statements with the first should statement selecting items from index A, the second from index B, etc.
The complication is that each index has its own parent-child relationships that have been implemented using the new join datatype. Some of the should statements involve has_parent queries which work on the intended index but fail on the others because they lack the same relationships:
query_shard_exception: [has_child] join field [_docJoin] doesn't hold [childEffort] as a child
One solution is to combine all of the parent-child relationships and use the same join datatype across all indexes. This prevents the has_child query from failing but seems a bit confusing and hacky. Is there a cleaner solution to this problem?
Thanks,
Shane