Reputation: 128
I have a structure of documents indexed in Solr that are grouped together by a property. Let's say I have a group consisting of three documents: A -> B -> C
I want to performa query by a property value V that will return the whole group whether A or B or C contain the value V. For example - the query will return my whole group (A,B,C) if B contains the value V.
Is this possible in solr?
Thanks!
Upvotes: 0
Views: 62
Reputation: 15791
If I understand correctly, yes, this possible. You can use Graph query parser to do this:
then, you query like this:
q={!graph+from=in_edge+to=out_edge}id:A
where id:A is the query to get the starting set of docs, and the {!graph ...} is to get all docs reachable from the starting set.
Some caveats:
Upvotes: 1