code: def recurse(query, index):
      
      for node in app.store.find(query):
          if node.is_leaf:
              index.add(node.path)
          else:
              recurse('{0}.*'.format(node.path), index)
docs: Recursively walk across paths, adding leaves to the index as they're found.