Facet Searching and Filtering in Typesense
TLDR David asked about how to perform a facet search and filter specific categories in documents. Kishore Nallan guided them on how to accomplish it and also mentioned curation based on filter_by is available in recent RC builds. This solution was also confirmed by Jason.
1
1
Oct 19, 2022 (14 months ago)
David
08:16 AM{
"facet": true,
"index": true,
"infix": false,
"locale": "",
"name": "categories.lvl0",
"optional": false,
"sort": false,
"type": "string[]"
}
Kishore Nallan
08:46 AM"facet_by": "categories.lvl0"
as a search param. What problem are you facing?David
08:59 AM{ "categories.lvl0": ["Furniture"] }
for example, or all the documents where lvl1 is Sofas, like { "categories.lvl0": ["Furniture"], "categories.lvl1": ["Sofas", "Poufs"] }
Kishore Nallan
09:00 AMfilter_by
, e.g. filter_by=categories.lvl0:= Furniture
David
09:02 AM{ "categories.lvl0": ["Furniture"], "categories.lvl1": ["Furniture > Sofas", "Furniture > Poufs"] }
dance where you add the parent and a seperator into the lvls? I know Algolia recommends thatKishore Nallan
09:07 AMDavid
01:05 PMq=*&filter_by=categories.lvl1:= Furniture > Shelving and storage&per_page=32
for a category page, and it works great. But how does the curation work here? From what I can tell curation is only for the query (*
in this case) and not for the filter? If i want to move item id 123 to the top of the Furniture > Shelving and storage
page and document id 456 to the top of the Furniture > Tables and side tables
page, how do I do that?Kishore Nallan
01:07 PMDavid
01:09 PMKishore Nallan
01:14 PM1
Kishore Nallan
01:14 PMJason
03:21 PMIf you’re using Instantsearch, then this is the format that those widgets work with
1
Typesense
Indexed 3011 threads (79% resolved)
Similar Threads
Fixing Multiple Document Retrieval in Typesense
Phil needed an efficient way to retrieve multiple documents by id. Kishore Nallan proposed a solution available in a pre-release build. After some bug fixing regarding id matching by Jason and Kishore Nallan, Phil successfully tested the solution.
Issue with Categories Facet in Typesense InstantSearch Adapter
David encountered an issue with not being able to add fields categories to facets. Kishore Nallan assisted in troubleshooting. After some back and forth communication, David finally managed to resolve the issue.
User-Specific Tagging and Filtering in UI
bnfd asked for the best way to create user-specific tags available on the UI. Jason suggested using personalized filters and creating a separate collection for each user's movies. The duo clarified the use of 'tags' in schemas and the refinementList widget in instantsearch. They also discussed various approaches to import and search large document collections.
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.
Query on Facet Values, `max_facet_values` , and `facet_query_num_typos`.
Jan asked about sorting facet values, managing `max_facet_values` and issues with `facet_query_num_typos`. Jason clarified the details on instantsearch widget handling of `max_facet_values` and identified a bug on the Typesense Server. Jason suggested a solution to the sorting issue.