Understanding Facet Query and Filter By on Typesense
TLDR 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.
May 08, 2021 (33 months ago)
Ricardo
09:19 AMKishore Nallan
09:20 AMper_page
and page
explicitly?Ricardo
09:21 AMRicardo
09:21 AMKishore Nallan
09:21 AMKishore Nallan
09:22 AMRicardo
09:22 AMRicardo
09:22 AMRicardo
09:22 AMKishore Nallan
09:23 AMfilter_by
https://typesense.org/docs/0.20.0/guide/building-a-search-application.html#filtering-resultsKishore Nallan
09:23 AM?filter_by=category: foo
Ricardo
09:23 AMRicardo
09:24 AMKishore Nallan
09:24 AMfilter_by
filters the actual results. It is equivalent to the WHERE clause in SQL.Kishore Nallan
09:25 AMKishore Nallan
09:26 AMRicardo
12:14 PMRicardo
12:14 PMRicardo
12:15 PMwouldn't that be equivalent to a facet_query?
Kishore Nallan
12:17 PMCorrect.
As for your second question, you can search on one set of fields and facet on another set of fields. They don't have to overlap.
Ricardo
12:18 PMKishore Nallan
12:18 PMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Merging Results of Multi-Search Queries: Workarounds and Future Features
Julian wanted to merge results from two similar collections. Kishore Nallan confirmed it's a feature that might be implemented but hasn't been prioritised. Both Julian and robert plan to use client-side solutions for now.
Issue with Sorting Search Request
Anton encounters an issue with sorting a search request due to an assuredly existing field appearing absent. Jason complements by revealing string sorting isn't supported. Kishore Nallan confirms future support for string sorting, despite its memory-demands.
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.
Moving from Algolia to Typesense: Questions and Answers
Juan sought advice from Kishore Nallan about moving from Algolia to Typesense, handling MultiSearch, setting parameters, checking imported documents, and a specific syntax query.
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.