Implementing State Export Feature Using Typesense InstantSearch.js on Node.js Backend
TLDR Kyle needed help passing search state to backend for implementing an "Export" feature, while using Typesense InstantSearch. Jason provided multiple solutions including advice on using Typesense InstantSearch adapter. The issue was resolved after some iteration.
Aug 23, 2021 (29 months ago)
TypesenseInstantsearchAdapter.configureationand the search state from
Checking if there's a canonical / easier way 🙂 the backend is in Node fwiw
So if you're not using text-based queries and only filters, then that would work. Otherwise, you would have to use search endpoint on the backend as well.
In fact, this is what the Typesense-Instantsearch adapter itself uses to send the search state to a Typesense backend
I think this should work... but let me know if you run into any issues with getting the adapter to work in a node environment.
Sep 13, 2021 (28 months ago)
search.getUiStateon the client and
search.setUiStateon the server. But I couldn't figure out how to respond to a search request without setting an arbitrary timeout to wait for results (it's "instant" after all 🙂 )
The Algolia docs were helpful but use their API client on the server vs. the InstantSearch lib. It seems the TS client and Algolia client are not compatible.
For my use case I need to run and process the results on the server vs. passing back to the client (similar to export with full query).
For now, my searches are fairly straightforward so I'm just going to translate the instant search format to something the TS client can use on the server
> so I'm just going to translate the instant search format to something the TS client can use on the server
This is what the InstantSearch adapter does, specifically this class: https://github.com/typesense/typesense-instantsearch-adapter/blob/0c9af2a2e0cec64b31bd5c3717f7289b5bbbe737/src/SearchRequestAdapter.js#L218
You might be able to use just that class, instead of the full adapter...
Sep 22, 2021 (28 months ago)
collectionSpecificSearchParametersin addition to the
instantSearchRequestbut was able to get the format the TS server needs. Thank you! 🙏
Indexed 3005 threads (79% resolved)
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.
Discussion on the Use of `TypesenseInstantSearchAdapter`
DavidLo sought advice to retrieve search results using `TypesenseInstantSearchAdapter`. Carl and Jason advised using `typesense-js` and features like `documents/export`, `documents/search`, `multisearch`, and pagination. The potential server-side solution and bundle size issues concerning the exposure of the search client were also discussed.
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.
Implementing Search Suggestion/Autocomplete Functionality in Typesense
Denis needed advice on implementing search suggestions in Typesense. Jason provided a solution for fetching after 3+ letters. However, questions on design pattern and passing hooks remain unanswered.
Resolving Issues with 'React-InstantSearch'
robert was having trouble merging results from different collections using `react-instantsearch` and was facing issues with undefined highlight results. After much discussion, Jason provided a solution using `collectionSpecificSearchParameters` and `highlight_full_fields` to solve the problem.