Quick Retrieval of Min, Max, and Median Values from Search Query
TLDR 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.
Apr 24, 2021 (31 months ago)
For e.g. lets say I have a collection with 100k documents with two fields : "name" (string) and "price"(float). I perform a search that returns 10k documents, which can be displayed at max 250 documents / page - so 40 pages. I want to figure out the min, median, and max price values across the 10k returned documents. The only way I can think of is to retrieve values from page #1 (min price), page#21 (median price), and page#40(max price) if my results are sorted on price:asc.
Is there a simpler way to retrieve a list of all price values from the 10k documents, so I can get the min,max,median more easily?
Could you share the exact query you’re using?
Indexed 2779 threads (79% resolved)
Querying with Typesense-Js and Handling Null Values
michtio was querying using typesense-js and receiving fewer results than expected. Kishore Nallan suggested using different query parameters. Further discussion led to the handling of 'null' values and filtering syntax in the search queries. The thread ended with Jason offering migration support from Algolia to Typesense.
Issues Sorting Multiple Fields with Sort_by in Typesense Query
Rishabh was having trouble sorting two fields separately with a single query. Jason explained that a secondary sorting will only occur if the first sort results in matching values. They clarified the functionality of sorting in various search engines.
Resolving Typesense Result Issue in Document Collection Queries
Mike was encountering errors when searching for specific query in their Typesense document collection. Jason suggested it may be due to the `drop_tokens_threshold` setting. There was a misunderstanding but after further explanation from Jason, Mike understood and decided to continue the conversation via email.