Resolving Issue with Instantsearch Sort_by in React
TLDR Edward had a problem with sorting functionality in a React component using Algolia's InstantSearch. Jason recommended a potential solution for specifying index names which resolved the issue.
1
1
Jun 17, 2022 (19 months ago)
Edward
02:43 PMWe have everything working accept the sort_by feature.
We’re using a normal (non Algolia) dropdown which dynamically changes the ‘sort_by’ parameter and causes a query to fire off. This works and results are returned, but the ‘hits’ remain the same as they were.
If we select a facet dropdown (which is an instantsearch widget), new results are pulled through with the sort too. Otherwise, the hits remain as they were.
We can see the network request so we know the hits we expect to come through are there, and the component is rendered, but the hits don’t change
Jason
03:14 PMEdward
03:25 PMEdward
03:25 PMEdward
03:28 PMIf we use 'Hits' instead of 'infiniteHits' our non-Algolia connected dropdown works flawlessly, but our component is based on infinite scrolling
Jason
03:40 PMCould you try setting the index name similarly in your custom widget?
Edward
04:10 PMEdward
04:11 PM1
Jason
04:11 PM1
Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
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.
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.
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.
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.
Connecting React Instant Search with Typesense Adapter
KARTHICK sought help with an error when using Typesense Adapter for React Instant Search. Jason advised substituting import statements. After uninstalling the react-instantsearch-dom package, KARTHICK resolved the issue.