You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Based on this example that uses Preact https://github.com/algolia/autocomplete/tree/next/examples/instantsearch
OK, this below works fine
search.addWidgets([ configure({ filters:'NOT Username:some_username' hitsPerPage: 10, }), ]);
But I want this to be dynamic, let's say if some checkbox is enabled, the filter is applied, if checkbox is not enabled, the filter doesn't apply
Looked for some info here https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/#filter-by-attributes-at-query-time
Can't find any example that would work for me
The closest I could get is this JS example, can't figure out how to integrated it into Preact boilerplate I used 😂
index.search('query', { filters: '(category:Book OR category:Ebook) AND _tags:published' }).then({ hits } => { console.log(hits); });
Took this example from https://www.algolia.com/doc/api-reference/api-parameters/filters/#apply-filters-on-a-search-query
Beta Was this translation helpful? Give feedback.
All reactions