Discussing Angular Instant Search Optimization
TLDR Ivan wanted to optimize Angular Instant Search by triggering search only on typing. Jason provided a solution and relevant documentation links. Kenneth provided additional input and advice.
1
1
1
Mar 01, 2022 (20 months ago)
Ivan
11:58 AMJason
04:03 PMJason
04:03 PMHits
component to only show it if the query in the search box is not emptyJason
04:04 PMIvan
04:37 PMJason
04:38 PMJason
04:41 PM1
Ivan
04:48 PM1
Jason
04:49 PMalgoliaClient.search(requests)
you want to call typesenseInstantSearchAdapter.search(requests)
in the last lineJason
04:51 PMjs
const searchClient = {
...typesenseInstantSearchAdapter,
search(requests) {
if (requests.every(({ params }) => !params.query)) {
// Here we have to do something else
}
return typesenseInstantSearchAdapter.search(requests);
},
};
1
Ivan
04:51 PMKenneth
04:55 PMIn terms of the initial page load, it's also worth noting that the instantsearch library displays the initial hits to initialize the connection for faster subsequent searches. I'm not sure if this also happens with Typesense, but if it is, it's worth considering.
In my own work I tend to prevent the initial page load by conditionally rendering only the refined results with an *ngIf to avoid any jarring UI experiences. While this does still send that initial request, it's not a big deal like with Algolia where you're counting every single request.
Kenneth
04:56 PMIvan
04:58 PMTypesense
Indexed 2776 threads (79% resolved)
Similar Threads
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.
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.
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.
Resolving Typesense Setup Issues with VueJS
A sought help with setting up Typesense in a CDN VueJS application. Jason guided him to adjust the initialization and provided a solution to an undefined item warning, resulting in a successful setup.
Implementing State Export Feature Using Typesense InstantSearch.js on Node.js Backend
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.