title: Best structure for storing tree in Elasticsearch?
body: <p>I am trying to store a tree in Elasticsearch. My tree can theoretically be infinitely long (although that is unlikely to happen) and can branch relatively often.</p>
  
  <p>What is the best approach for storing this?</p>
  
  <p>I looked into <a href="https://stackoverflow.com/questions/9970193/how-to-store-tree-data-in-a-lucene-solr-elasticsearch-index-or-a-nosql-db">this question</a> but its answer has limited performance when branching. Is there any way I can achieve proper nesting of documents, while still having the flexibility of branching, and the overall performance when reading a tree and its nodes?</p>