Has_child + min_children on multi-type


(Lior) #1

I have an index name "relations" which has the following types: relation, person, car
the relation is the parent, and each relation has 2 children: person & person, car & car, person & car
person and car both has a field "ref_id"

now, the user is giving me an input of list of ref_ids, and i need to bring all the relations that has those id in both of the children.
my query will be should clause with "has_child" on type person and another "has_child" on type car with min_children:2
the problem will be in the person-car relation - how i can make a child query with min_children on 2 different types?


(system) #2

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