Resolve Facets and Sorting Issues with Typesense
TLDR Ethan needed assistance with getting all facet values and sorting results by date using Typesense. Jason provided guidance on how to use Typesense properties to accomplish these tasks, and resolved issues related to specific use-cases provided by Ethan and Rushil.
Jul 25, 2023 (4 months ago)
Jul 26, 2023 (4 months ago)
max_facet_values: 9999999(some large number)
showMoreLimitparameters in RefinementList or any of the other filter widgets, which the adapter then uses internally to set facet_by and max_facet_values
Could you elaborate on this? This is how I’ve seen refinementList work by default
marketingoption, if I first filter by internships then this facet option wont appear in our refinement list
v2.7.1-3of the adapter
itemsarray, in the format described in that section
_text_match:descdefault for every query? or should it be specified and somehow our default sort is already updates_date:desc
If so, could you copy-as-curl the network request to Typesense for both sort orders and DM it to me?
If no sort_by is mentioned, yes this is default.
If a sort_by is mentioned,
_text_match:descis added as the last sort parameter, after the sorts you’ve specified in sort_by
"default_sorting_field": "updated_date"in the collection schema. So when you don’t specify a sort_by parameter in the search, Typesense automatically sorts by
updated_date:desc. This is why the results look similar when you add
qis something other than
*, which is when text_match is calculated. Otherwise text_match is identical for a wild-card
group_by: company_nameand set
objectId. It seems like this isn’t possible on Typesense though
Unfortunately no. You would have to create a new collection and reindex your data in it.
Do you let Algolia auto-generate these objectIds or do you generate them on your side?
We generate the object IDs and sync them to Algolia. We’re doing the same thing with Typesense with
idwhich is used to dedupe records. However, you can’t use the
idfield for sorting. So you would have to duplicate the same
idin a new field called say sortId and then use that field for sorting
posting_idfield. I think I may have misread something, but can you sort string fields? I’m running into errors when trying
sort: truein the schema for that field definition
But you can mimic the default_sorting_field behavior, by just using sort_by explicitly in the search query
Indexed 3015 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.
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.
Range Filtering and Faceting Discussion
Phil asked about the requirements for range filtering, which Jason explained does not always require faceting. Discussion about different possibilities with Algolia and Typesense ensued, resulting in Phil successfully utilizing the 'Configure' widget.
Typesense Sorting Query and Bug Report
michtio is new to Typesense and is querying sorting implementation. Jason shares resources and suggests use of specific adapters. However, michtio shares a bug found when applying a filter on Typesense. Jason asks for a GitHub issue to be opened for the bug.
Troubleshooting Typesense Setup and Understanding Facets and Keywords
Demitri encountered errors when exploring Typesense for the first time. Jason guided them through troubleshooting and discussed facets, keyword settings, and widget configurations. Helin shared a Python demo app and its source code to help Demitri with their project.