code: protected void retrieveAggregateRoot(NodeData state, Map<String, NodeData> map)
     {
        if (indexingConfig != null)
        {
           AggregateRule[] aggregateRules = indexingConfig.getAggregateRules();
           if (aggregateRules == null)
           {
              return;
           }
           try
           {
              for (int i = 0; i < aggregateRules.length; i++)
              {
                 NodeData root = aggregateRules[i].getAggregateRoot(state);
                 if (root != null)
                 {
                    map.put(root.getIdentifier(), root);
                 }
              }
           }
           catch (Exception e)
           {
              log.warn("Unable to get aggregate root for " + state.getIdentifier(), e);
           }
        }
     }
docs: Retrieves the root of the indexing aggregate for <code>state</code> and
  puts it into <code>map</code>.
  
  @param state
  the node state for which we want to retrieve the aggregate
  root.
  @param map
  aggregate roots are collected in this map. Key=UUID,
  value=NodeState.