Vue-InstantSearch Default Page Issue with Typesense Integration
TLDR Mehul is having issues setting the default page number with vue-instantsearch and Typesense. Jason suggests asking the vue-instantsearch team and trying the configure widget.
Jun 19, 2023 (3 months ago)
Mehul
09:55 AMI have implemented the vue-instantsearch module to incorporate Typesense functionality. In order to set the default page number upon page reload, I am utilising the searchFunction as shown below. However, the search request does not have the default page set, and instead, it is returning results from the first page upon reloading the page. Could anyone please look into it and help to fix the issue?
<ais-instant-search :search-client="searchClient"
index-name="products_production"
:search-function="searchFunction"
>
</ais-instant-search>```
I hearchFunction(helper) {helper.setPage(2).setQuery('cat')
if (helper.state.query) {
helper.search();
}
}```
Thank you.
Jason
02:16 PMhelper.setPage(2).setQuery('cat').search()
Mehul
02:17 PMJason
02:18 PMBut for your use-case of setting default search parameters, I’ve usually seen users use the configure widget: https://www.algolia.com/doc/api-reference/widgets/configure/vue/
Mehul
02:19 PMMehul
02:20 PMTypesense
Indexed 2764 threads (79% resolved)
Similar Threads
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.



Issue with `typesense-instant-search-adapter` Filters
Mathieu had trouble applying a default filter for the `typesense-instant-search-adapter`. They resolved their issue after Jason suggested checking the version of the adapter, which turned out to be outdated.

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.
