Hi everyone.
It is my first rodeo with Typesense, have built some search experiences on top of ElasticSearch, and I have come to a problem that I haven't been able to solve in a nice manner. I my requirements I have this feature that the search results should exclude all of the results based on a user attribute e.g return all of the products that the user hasn't seen.
1. At first I was planning to store the user_id in a product document as bunch of arrays, but I thought that this is no good as it requires a lot of writes and re-indexing
2. Then I thought what about if I send at the query time bunch id's that I want to exclude from the results - but then I thought that I might run into too long query strings and run into url lenght limit
3. Then I thought what about I just query all of the documents and filter out the ones I don't want server side and run a query again - but this felt like huge hassele and compute resource over usage.
4. Then I thought about joins so what if I have two collections products and products_viewed and would exclude the results using left joins or using something like where not - but as fair as I know it is not possible to do ?
So yeah I am a bit stuck at the moment, so any help is much appreciated 🙂