If I have "title" and "category" as searchable attributes in the Algolia admin, is there any way that I can have one <SearchBox />
searching only on "title" and another searching only on "category"?
At the moment, a <SearchBox />
component from react-instantsearch-dom
appears to search ALL searchable attributes. I would ideally like to separate the searches.
I could not find anything for this kind of setup in the documentation: https://www.algolia.com/doc/api-reference/widgets/search-box/react/
Any help would be greatly appreciated.
From Algolia docs, you could use a
Configure
widget lets you provide raw search parameters to the Algolia API and pass in value for therestrictSearchableAttributes
property. like so:It doesn’t render anything on screen, it only applies the provided search parameters passed in once the component mounts