title: What are the pros and cons of using Nested mapping in Elasticsearch vs parent child relationship
body: <p>Currently in my ES document structure, there is a field of type 'Object'. This is a json object which can have upto 3000 fields inside. The problem being that at times, my ES runs out of memory because of the document size being too large. So  I am looking to change my document structure.</p>
  
  <p>The two structures that I am looking at are - Nested mappings and parent child relationship. Both the structures satisfy my requirement for search. Points being considered : </p>
  
  <ol>
  <li>I read that nested queries are much faster than child queries. </li>
  <li>Nested mappings too save the nested fields as separate documents.</li>
  </ol>
  
  <p>Two points of confusion that I am facing :</p>
  
  <ol>
  <li><p>How does nested indexing work? Does ES get the whole document in one go and analyze it completely at once, or the requests for nested documents are individual. Because in the first case, it might so happen that ES runs out of memory again.</p></li>
  <li><p>When we say parent child queries are slower, how slower do we mean? </p></li>
  </ol>
  
  <p>Looking for inputs.</p>