Most efficient way to model data in Elasticsearch
<p>I have an example of modelling an commence site. Say that the site has few hundreds shops and few millions products. The products per shop range: 1000-100.000 products/shop. I need to be able to aggregate the products and the shop fields. All the products and all the shops have the same schema.</p>

<p>Product</p>

<pre><code>        {
          "productName"
          "price"
          "category"
        } 
</code></pre>

<p>Shop</p>

<pre><code>{
  "shopName"
  "rating"
} 
</code></pre>

<p>1)  Is it more efficient to have a) 1 index/shop, b) same index and 1 type/shop or c) same index, same type and have a field to determine the shop of the product?</p>

<p>I read some related articles and most of them are in favour of same index and 1 type/shop. But then they say that if there is one single index which has a large number of docs it might be even slower than having multiple indices.</p>

<p>2) I also need to perform JOINS and aggregations between the shops and the products. For example I need to be able to retrieve all the products from the shops with rating higher than 8/10 and also get the number of products per category. Is it preferable to use a) application-side JOIN, b) parent-child relationships, c) <a href="https://siren.solutions/relational-joins-for-elasticsearch-the-siren-join-plugin/" rel="nofollow">Siren plug-in</a>, d) something else?</p>