Filtering a large products base by user history

Hello,

This subject has probably been discussed many times but i can't figure out what to type in Google to find answers so fill free to send me a link to a different discussion and close this one if that's the case.

My company is about to launch an online shop that will rely on Elastic Search for displaying the catalog, which means everything from categorisation to tags relies on indexaction, we use our local database only for displaying a particular product, prices etc.

One of the requierements if for a particular client to filter only products he has already ordered.
We have about 40k products, a few thousands clients that usually have ordered up to a few thousand products. So for managing this, we figured three possibilities : send the list of product id the users has ordered to the api on every request, list the users that have ordered every product in the index or keep an index per customer that would only contain products linked to his account. Which of these solutions would seem best in terms of performances, or maybe there's a better idea ?

Thanks

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