We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to set a default query to search instead of a empty search?
As i have pretty urls my search query will be like this
www.site.com/search/book instead of www.site.com/search?q=book
so i cant have the url sync enabled, so I have set urlSync to false. Now the inital query that is been passed is empty as it cant ready the url.
Is there a way to set the query before the search i been triggred.
i tried using the helper from the searchFunction but the api for the helper is totally diff from algoliasearchHelper
The text was updated successfully, but these errors were encountered:
Yes, you could try to do this:
var search = instantsearch({ searchFunction(helper) { if (firstLoad) { search.helper.setQuery('book'); helper.search(); } } });
This is tricky as an API I must say, should work though.
Sorry, something went wrong.
Will try this
mean while when i went through the code found this for SearchParameters
{ "query": "book", "disjunctiveFacets": [ "customerReviewCount", "category", "salePrice_range", "manufacturer" ], "maxValuesPerFacet": 30, "page": 0, "hitsPerPage": 10, "facets": [ "type", "shipping" ] }
Yep this should work also, unsure if you are then able to override the query, try it and close the issue if solved. Thanks!
No branches or pull requests
I am trying to set a default query to search instead of a empty search?
As i have pretty urls my search query will be like this
www.site.com/search/book instead of www.site.com/search?q=book
so i cant have the url sync enabled, so I have set urlSync to false. Now the inital query that is been passed is empty as it cant ready the url.
Is there a way to set the query before the search i been triggred.
i tried using the helper from the searchFunction but the api for the helper is totally diff from algoliasearchHelper
The text was updated successfully, but these errors were encountered: