How a user can favorite a item in a search ( many to many ) - product - user

hello , I wonder to know how a user could to save favorites , like this image .
if I use a relational database , I could make a many to many relational .

but with Elasticsearch . how could I do it ?

I know that I could join the product with the user , like this -

but , the problem is that Elasticsearch works with shards , and if start saving a lot of products , I dont know if it wold nbe the best idea to keep the USER_SAVES_PRODUCT in Elasticsearch or in other database .

what wold be the best way Elasticsearch interact with user saves products ?
wold keep the user save produtcs in other database ? or keep all in Elasticsearch ?

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