Elasticsearch performance impact on choosing mapping structure for index Elasticsearch performance impact on choosing mapping structure for index elasticsearch elasticsearch

Elasticsearch performance impact on choosing mapping structure for index


Flat structure will perform better than nested. Nested queries are slower compared to term queries ; Also while indexing - internally a single nested document is represented as bunch of documents ; just that they are indexed in same block .

As long as your requirements are met - second option works better.