Need help on ES (seller+product)

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,

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.

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