What is depth weight represent in graph

You may have confused my id field with elasticsearch's internal _id field. Maybe a less confusing choice of field name would be person_id. It is not a duplicate in my example and is a deliberate assertion required to express one of the relationships shown in the diagram.

You will need to use the example format I provided rather than your example data above.

Hi sir thanks for the reply with your example it create 2 documents but internally document data will be same only for maintaining parent as A and child as C b data need to be entered 2 times

in my case there can be 1:n childrens so i cant able to create n parent document for n childs

hi sir basically i need parent child relationship for same index type which is not possible so we are using nested object but its difficult to maintain so is there a way to create relation for same type document

My example was about parents in terms of fathers and mothers - not any elasticsearch notion of placing parent/child documents in the same shard. I'm still unclear as to exactly what business problem you are trying to solve.

If you are talking about using elasticsearch parent/child functionality to represent marriages (i.e. your "Anna --wife--> dave" example) then this introduces some problems. How do you determine who is the "parent" document in a marriage? Is it always the male? Do you know the genders? What happens in a same-sex marriage? etc.

My examples can be used to express any relationship (wife/brother/mother/employer...) and do not mandate any physical co-location although clearly having everything in one place is always an advantage if the data volumes aren't too high.

hi sir basically i need parent child relationship for same index type which is not possible so we are using nested object but its difficult to maintain so is there a way to create relation for same type document

in windows if we click on folders properties we get total( files in that + files inside subfolder +files till nth level folder) how can i achive this using elasticsearch

That's not a graph API question. Please ask that in the elasticsearch forum.

ok thanks for the reply

In graph request if vertex has the fields then why is it required to add in connections and why exclude field is used in connections

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