Yes, nested objects are stored as multiple documents in your index. The _stats api returns the number of individual Lucene documents in the index which will include all the nested documents as well as the root documents. See this section of the Definitive Guide book for more information on how nested documents work: https://www.elastic.co/guide/en/elasticsearch/guide/current/nested-objects.html
Thanks for clarifying that. So is it more expensive to load/query the doc this way? i.e. should I strip out the nested objects? As I am getting OOM errors when doing bulk data loads, not sure if its related to this problem or not
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.