Hello, I am using Solr to index Drupal node relations (over 300k relations on over 500k nodes), where each relation consists of the following fields: - id : the id of the relation - source_id : the source (parent) node id - targe_id : the targe (child) node id
I need to be able to find all descendants of a node with one query. So far I've managed to get direct children using the join syntax of Solr4 such as (http://wiki.apache.org/solr/Join): /solr/collection/select?q={!join from=source_id to=target_id}source_id:12 Note that each node can have multiple parents and multiple children. Is there a way to get all descendants of node 12 without having to create a loop in PHP to find all children, then all children of each child, etc ? If not, is it possible to create a recursive query directly in Solr, or is there a better way to index tree structures ? Any help or suggestion would be highly appreciated. Thank you in advance, Semiaddict