Optimizing Product Search by Category in Typsense Collection
TLDR Jacob is inquiring about the impacts of filtering based on category hierarchy in Typsense. Kishore Nallan suggests creating separate fields for various category levels and optimizing for search, despite possible frequent updates.
1
Oct 21, 2022 (14 months ago)
Jacob
01:40 PMI have this category hierarchy (in memory, not in typsense) which might consist of a maximum of 1k categories. Depth wise maybe max 10.
In my typsense collection of products, every document holds a single
category_id
value. What I want to do is to search for products that belong to a specific category_id AND all of its subcategories. I can easily traverse the category tree and identify all category_ids that I need to filter for.My question is, how bad is it, performance wise, to potentially filter on hundreds of values?
Kishore Nallan
01:43 PMcategory.level0
, category.level1
etc. so that when you want to filter you can do that at any level in the category hierarchy with a single filter by field.Jacob
01:47 PMKishore Nallan
01:49 PMKishore Nallan
01:50 PMKishore Nallan
01:50 PM1
Jacob
01:51 PMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Discussing Document Indexing Speeds and Typesense Features
Thomas asks about the speed of indexing and associated factors. The conversation reveals that larger batch sizes and NVMe disk usage can improve speed, but the index size is limited by RAM. Jason shares plans on supporting nested fields, and they explore a solution for products in multiple categories and catalogs.
Discussions on Typesense, Collections, and Dynamic Fields
Tugay shares plans to use Typesense for their SaaS platform and asks about collection sizes and sharding. Jason clarifies Typesense's capabilities and shares a beta feature. They discuss using unique collections per customer and new improvements. Kishore Nallan and Gabe comment on threading and data protection respectively.
Performance Characteristics of Filtering Search Results
Oskar queries the performance difference in filtering search results. Jason clarifies how filters work and provides performance improvement suggestions like increasing vCPUs and sharding the collection. Kishore Nallan explains filter IDs and document ID matching. The thread concludes with discussions on performance tradeoffs in filter implementation.