I’m facing one issue. I have a custom search with Instantsearch.js and for it I’m having custom results because I wanted to skip default hits with extra divs [I’m doing a carousel based on it]
Right now I’m facing two issues.
How can I generate default results based on a one category. At this point default view should show only elements from one category, when user search for more it should search only within this category.
I have attribute named: category and it has some values like categoryname1, categoryname2, categoryname3
I tried using:
options.helper.addFacetRefinement but it’s been throwing error that:
category is not defined in the facets attribute of the helper configuration
Can someone point me what is the best way to solve that and get results only from one category?
Looks like i’m missing something from facets. I’m not using any custom checkboxes for users, they don’t need to control that.
When building carousel I’m just using simple vanilla js to move everything based on div’s and setting for them data-target attribute, count number of elements and move everything.
This works perfectly but not with Algolia generated search elements.
I tried to wait some time before calling carousel, until elements will be loaded with setTimeout but the same results.
What I am missing in there?
Thanks in advance
I took different approach and so far I’m close with solving it.