Nested Facets and Collection Limits

TLDR Tuhin asks about hierarchical/nested facets and collection limits. Kishore Nallan shares a sample app and suggests having 100-1000 collections with user assignments.

Powered by Struct AI
Join the chat
Jun 01, 2023 (4 months ago)
Photo of md5-edc6bfa1b22fb2459203db7fddda468d
12:15 PM
Hey Guys 👋
Love the product and I can't wait to get started with it. I"m trying to figure out how I can work with it and had a couple of questions.
1. How do I do hierarchical/nested facets? I saw the documentation for `enable_nested_fields but couldn't figure out how I can build nested facets.
2. My application handles user generated content and each tenant can have their own schema for documents. Would a collection per tenant work well? I couldn't find a limitations page about how many collections I could create.
Thanks for the help 🙂
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:17 PM

1. Please see this sample app for hierarchial categories: https://github.com/typesense/showcase-ecommerce-store
2. I've seen people with 100K collections so it's fine. However a middle ground is to have 100 to 1000 collections and assign users via user_id % 100 logic to one of those collections.