Using Alphabetical Sorting Feature with Typesense-InstantSearch-Adapter
TLDR Jan inquired about using the alphabetical sorting feature with the typesense-instantsearch-adapter. Jason clarified that the feature is available from version 0.26.0.rc.
1
Oct 04, 2023 (2 months ago)
Jan
01:13 PMI’m looking at the github issue [NEW Feature]Sorting facets alphabetically #521 Does this work with the typesense-instantsearch-adapter?
Currently I’m doing it like this with typesense-instantsearrch-adapter. Will the sortBy option work when version 0.26 is available?
refinementList({
container: '#relevant-gdpr-articles',
attribute: 'relevant_gdpr_articles',
operator: 'and',
searchable: 'true',
limit: 0,
sortBy: ['name:asc'],
}),
Jason
01:15 PMsortBy
inside refinementList is client-side sorting done by the widget.To get Typesense to sort facets alphabetically on the server side, you'd need to set
sort_by
in additionalSearchParameters
when instantiating the typesense-instantsearch-adapter.Jan
01:17 PMJan
01:17 PMJason
01:18 PM0.26.0.rc22
is the latest RC as of today, but it has a known performance regression when using group_by
. We're working on addressing thatJan
01:19 PMv0.25.2.rc1
it’s not added to that version I guess?Jason
01:21 PMJan
01:23 PMJan
01:23 PM1
Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
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.
Resolve Facets and Sorting Issues with Typesense
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.
Diacritics Support in Instantsearch.js RefinementList
Jan queries about enabling special characters in instantsearch.js refinementList. Kishore Nallan admits diacritics support exists for text searches, promising to look into supporting it in query fields. After claiming a fix, Jan later reports issues post-upgrade, which Jason & Kishore Nallan promise to resolve.
Resolving 'stores_count' field sorting issue in Schema
em1nos encountered an issue sorting the 'stores_count' field, which was due to a field disparity in multiple collections. Upon resolving that, a subsequent issue with instant search internally managing sorting came up, which Jason addressed by releasing an updated version of the adapter.
Setting Alphabetical Ordering for Facets in Typesense
Sean inquired about setting the ordering of a facet to alphabetical in Typesense. Jason suggested using `transformItems` or a normal JS array sort on `items`.