I'm encountering an issue with configuring Algolia using Vue InstantSearch. Specifically, I'm trying to use the widget to set search parameters, but I keep receiving the following error:
Error: The 'searchParameters' option expects an object.
I have successfully implemented pagination and basic search functionalities using Algolia Vue InstantSearch. However, when I attempt to configure search parameters using , none of the methods I've tried seem to work.
<ais-configure
:hits-per-page.camel="4"
:distinct="true"
:enable-personalization.camel="true"
/>
<ais-configure
:search-parameters="{
hitsPerPage: 1
}"
/>
<ais-configure
:v-bind="{
hitsPerPage: 1
}"
/>
Despite these attempts, I consistently receive the error stating that the searchParameters option expects an object. The search and pagination functionalities are working as expected, which suggests that the Algolia integration itself is functional.
I would greatly appreciate any suggestions on how to correctly configure <ais-configure>
correctly.
A similar issue was reported here.
A pull request has since been merged regarding that issue.
Overall, this was a bug. Now solved in vue-instantsearch@4.16.1
, which was released on April 30th, please consider upgrading to at least that version.
Or even v4.17.4
for the latest as of the time of writing this answer.