Hi,
I would like to give parent/ child relationship between three different indexes,
where indexes are index1, index2, index3 with different types in those indexes..
May I know is it possible???
No you cannot.
Needs to be done in the same index, and specifically, in the same shard.
How to know that my data is in a particular shard? and how can I keep in the same shard???????????
where my settings having following information regarding shards as shown:
"number_of_shards": "5",
"version": {
"created": "1050299"
}
Wanting to have parent/child relations between indexes is, I think, a smell of a bad data model. It looks to me you are storing different entities in different locations. Perhaps you should aggregate those entities together.
With regard to your routing question, see https://www.elastic.co/guide/en/elasticsearch/guide/current/indexing-parent-child.html
Hi Patrick,
Then what about the shards as Mark mentioned???? May I know what exactly the shards do???
How can I maintain the data in the same shard and how to know that in which shard my parent data is stored..??????
@warkolm and @PatrickKik Thanks for your reply, and I came to know what exactly the data need to be in same shard. This helps me to sort the problem.
Thank you..
And can we have more than one parent in a child type???
You can have one parent per child. It saves you the horrors of conflicting multiple inheritance.