New issue
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
How to add parameters before search() ? #28
Comments
Hey @Geoffrey63, Thanks for submitting this issue. Indeed the documentation is not very clear about that and we're working on better documentation in the near future. That being said, let me explain what is happening:
This is because InstantSearch Core is built on top of the AlgoliaSearch-Client, offers better APIs to set the filters, and will override the properties in Client. That being said, I definitely believe that we should do a better job in deciding what/how to expose those methods/properties, and rest assured we're working on this next. |
Hey @spinach, Running into the same problem, super frustrating why I can't port over same Angular Algolia logic to iOS Instant Search.
The filter state description I get looks right, and I've faceted all the right attributes on the dashboard as 'searchable'( "visibility_status", "athlete_user_id"). The hits return literally a full query without filters. Only thing that worked from the query was the page limit size. What am I doing wrong? Followed these docs https://www.algolia.com/doc/api-reference/widgets/filter-state/ios/ |
Hello @leojkwan |
So I got things working by using facetFilters = [] with the same query syntax strings I posted above. I’ve tried generating the filter string both manually and through converting filterState as mentioned in the docs but it didn’t work. To be clear I don’t plan on faceting userIds but as long as it works I’m cool with it for now(currently not displaying any facet filter UI). I am using the hits interactor and though I did not generate the string from the dashboard I am positive it is correct. The only different with facet filters is that negation is annotated with a minus instead of NOT(ie “visibilityStatus:-archived”) |
Struggle with this issue for a few hours, as well. Like @leojkwan, I used |
I am adding a parameter to Searcher like this :
On the results, this params is not taken in account.
Here is the debug result. The filter appears in the Searcher params :
Can any one please tell me how can I add parameter to the InstantSearch ?
The text was updated successfully, but these errors were encountered: