# Need help on ES (seller+product)

**URL:** <https://discuss.elastic.co/t/need-help-on-es-seller-product/185923>\
**Category:** Elasticsearch\
**Created:** [June 15, 2019, 6:21am UTC](https://discuss.elastic.co/t/need-help-on-es-seller-product/185923 "2019-06-15T06:21:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Babu\_Babu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/babu_babu/32/48168_2.png) [@Babu\_Babu](https://discuss.elastic.co/u/Babu_Babu)\
**Post date:** [June 15, 2019, 6:21am UTC](https://discuss.elastic.co/t/need-help-on-es-seller-product/185923/1 "2019-06-15T06:21:40Z")

</div>

Hi,  
I am new to elastic search, I need some immediate help on my project data model.

I need to display the following list on front end.

SellerName ProductCount reviewdCount  
Seller1 2500 products 1000  
Seller2 500 products 200  
.  
.  
.

So the model details will be  
Seller  
\_id, name, createdon, updatedon  
Product  
seller\_id, product\_name, desc, creadtedon, updated

Note: For, better amd quick understanding I have given some fields only. I know es does not support join like sql...so I am looking to do this in es.

So, my question is

1. Can I go with two indexes for both seller and product?
2. Or Can we handle it with single index. If yes, we need to store seller name and seller \_id alongwith products documents....but the real pain is, whenever the seller name changed, name must be updated in 2500 product docs...Is it a good idea...? What about performance,

Please help on this. Seriously, maximum sellers will be 500 - 5000...and products will be stored more than 2 lacks...

It would be nice if you provide some queris to get seller list along with product count...

Thanks,

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 15, 2019, 9:32am UTC](https://discuss.elastic.co/t/need-help-on-es-seller-product/185923/2 "2019-06-15T09:32:38Z")

</div>

I would recommend denormalizing and storing seller information with each product. This simplifies querying and updateing a few thousand documenst once in a while if a seller changes information is quite quick.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 13, 2019, 9:32am UTC](https://discuss.elastic.co/t/need-help-on-es-seller-product/185923/3 "2019-07-13T09:32:53Z")

</div>

Closed on July 13, 2019, 9:32am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
