This question is “how” would I do something like t...
# community-help
t
This question is “how” would I do something like this.. which maybe the answer is don’t, or at least think about it another way, but I don’t know what I don’t know_._ Context: A collection of things that is indexed, could be anything, but in my use case, it’s a collection of collectable trading cards (similar to Magic: TG). Envision a deck builder interface that is similar to the standard filter/faceted search that shows all cards with the ability to whittle down to what you want to see. That’s great for a generic representation of the entire set. What I’m after is, how do I limit the cards shown, to what the searching user’s own collection. I would like the ability to toggle between owned and all, or at least highlight what is owned in the all view. I’ll have a list of the cards the user owns, I’m just not sure how I’d filter on that if we’re talking about 100-500+ cards that a user owns. An idea is to also index a collection of card <> user records, to represent who owns what, and do some sort of join filter on that, but I could see that running into bad performance eventually when that collection gets to be huge. It also seems like a bad idea to shove user_ids into an owned column on the cards themselves. Either way though, I can continually update the index whenever a card is moved into an user’s account. I’m trying to prevent having two interfaces in which one uses Typesense and the other is just filtering on a set of things coming back from Postgres, and losing out on the ts features. But I’m not sure how to structure this at all.