Setting dynamic range faceting in Typesense
TLDR Jacob requested dynamic range faceting in Typesense, and explanation for fetching max/min values. Kishore Nallan clarified pricing bucket sizes were user dependent and explained the stats return as part of facet results.
Aug 30, 2023 (3 months ago)
We have large number of products in a collection and facet on price to support our filtering tool and to show a small graph of the distribution. However, we don’t want to return an enormous response to the client, so we set max_facet_values to 100, but that is not enough and can cause some really bad behaviour where we (for example) miss the highest/lowest values.
What we want to be able to is to ask Typesense to facet on price and dynamically return X number groups based from the lowest to the highest price.
But even more important to start with, how can we ensure that the lowest AND the highest value is included in the faceting response? Without that our entire filtering functionality breaks down.
Kishore Nallan08:55 AM
However, our urgent problem is the min/max values. The ranges in between is just needed for the graph, but when we’re missing the min/max values the filter-slider ends up lying to our user.
What is the best way for us to retrieve the max/min values for the indexed prices?
Kishore Nallan10:48 AM
On our product page we have a range slider where it’s possible to filter on the price range. For that, we need to know what the lower and upper bound should be.
Kishore Nallan11:23 AM
Kishore Nallan11:32 AM
Indexed 3015 threads (79% resolved)
Improving System Performance and Typesense Query Efficiency
SamHendley was experiencing performance issues with Typesense's large-scale system testing and proposed several improvements. Both Jason and Kishore Nallan addressed the suggestions and corrected some misconceptions. They provided further clarification and recommended upgrades for better performance.
Quick Retrieval of Min, Max, and Median Values from Search Query
Prajjval sought a more efficient way to find the min, max, and median values from a search query result. Jason suggested faceting. However, Prajjval clarified that faceting prolonged document upload due to a data type error, which was later resolved.
Issue with Numerical Faceting in Combination with Group_by
Vamshi encounters issues with numerical faceting when used in conjunction with group_by in Typesense. After a detailed query script, Kishore Nallan identifies this as a bug, encouraging the user to raise a Github issue.
Implementing Histogram Slider with Typesense
em1nos asked about implementing a histogram slider with typesense. James suggested using facets and group by feature. Jason recommended creating a new field for price buckets to achieve the desired output using facet_counts.
Understanding Facet Query and Filter By on Typesense
Ricardo needed clarification on using facet_query. Kishore Nallan explained its use alongside `filter_by`, helping Ricardo understand the concepts. The discussion also touched upon how facet_query works with sets of fields and the difference between facet_query and filter_by.