Filtering some facet values
See original GitHub issueWhile displaying my facets, I would like to filter out some of them without removing them from my index. I was thinking about something like:
search.addWidget(
instantsearch.widgets.refinementList({
container: '#brands',
attributeName: 'brand',
transformData: function(data) {
if (data.value === 'uggly') return false;
// [...]
return data;
}
})
);
or
search.addWidget(
instantsearch.widgets.refinementList({
container: '#brands',
attributeName: 'brand',
filterFacets: function(facets) {
return filter(facets, function (f) { return f.value !== 'uggly' });
}
})
);
If well documented, I don’t think it will conflict with the limit
attribute.
What do you think?
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Filters and facet filters - Algolia
For facet filtering, all you need to do is list the attributes using brackets. Without brackets, the entire list is interpreted as combining ......
Read more >Faceted Filtering: The Ultimate Guide For eCommerce Sites
Faceted search allows you to create filters based on keywords. You can provide shoppers with multiple filters, which makes the experience similar to...
Read more >Faceting and filtering - Bloomreach Documentation
The fq parameter filters on facets. Your product feed must include any filtering elements that you want applied to your search results. Confirm...
Read more >The Definitive Guide to the Difference Between Filters and ...
Unlike facets, filters never change between searches. They will always be the same and don't adjust to reflect the search results, ...
Read more >What is Faceted Search and Navigation? 14 Tips & 24 Examples
There are several ways of displaying facet filters. Options include links, sliders, checkboxes, dropdowns, and input fields. · Choose the way you ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Haroenv My use-case was a bit more involved (more than just filtering, but similar requirements), so I made an issue: https://github.com/algolia/instantsearch.js/issues/2283
Hey @timkelty, this is a very old issue, could you make a new one describing your issue? You can use every template as a function, and there leave out any values you need