Is it possible to use a single RefinementList to search across multiple (three) attributes?
The RefinementList widget itself only takes one attribute.
Could you explain your specific use case?
Depending on it, there are a couple of options:
Update your data structure to combine these attributes into one attribute:
Create 3 separate RefinementList Widgets, one for each attribute
Using a Custom Widget, potentially create a widget that queries 3 different attributes, then combines them in a single list
Hi @mattucci -
We’re looking to combine three data points (Services, Umbrella Services and Conditions) into one searchable list - the specific type doesn’t matter to the end user, it’s used as a data organizer on the back end more so. So we were hoping to only have one list that uses all three data points.
Thank you for the reply!
I also have the same problem.
I am using your WordPress plugin to index my site. One of the attributes that was indexed is a taxonomy, and the other attributes that I want to group together in the refinementList widget are boolean custom fields.
Can you explain how I can combine them together into one refinementList widget?
I’m ok with PHP but not JS. So maybe altering the data structure to combine them into one attribute is the best option, but I’m not sure how it can be done.
The correct place to combine the attributes for you would be before the data gets sent to Algolia, and less so with JS after the fact. So utilize PHP to modify the data to something consolidated into a collection of items for a refinement list.
Depending on what the data is you might want to take a look at hierarchical facets to see if they match what you need. Where you can “drill down” through filters.