Multiple join in one index


(Virgile Cabane) #1

Hi,

I am currently updating my mapping so I can upgrade ES to version 6.
I have a question, at the moment I have 2 parent-child relation in my mapping:
User (parent of) Question (parent of) Answer

In join quide it is specified that only one join field can be used in an index.

Does anyone knows how I can achieve getting my mapping work in ES6 ?


(Jimferenczi) #2

The new parent_join field can handle multiple relations in a single field. The note in the documentation about using only one join field does not mean that you cannot have multiple relations but rather that all your relations must be defined in a single field. You can check this example that shows how to define multiple levels of relations:
https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html#_multiple_levels_of_parent_join


(Virgile Cabane) #3

Damn perfect, I misunderstood this line.
Thanks for the answer =)


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.