I'm actually working on a faceted search, and I can't find a good
solution to a problem (in the docs nor with my best friend Google ;)).
One of the facets I have to manage has to be hierarchical (it's a
category filter, one record can have multiple categories of multiple
levels). Example :
- First level on search :
[ ] Computers (10)
[ ] Sea (5)
- User checks "Computers". We have to give him all records associated
to category "computers" (or to any subcategory), and to propose the
sub-categories facetized :
[ x ] Computers (10)
[ ] Internet (6)
[ ] Hardware (2)
My problem is to get only facet counts for categories under
"Computers", as a record can be associated to "Internet" and to a
subcategory of "Sea".
The only solution I can find for the moment, is to use the "regex"
param with a list of ids corresponding to subcategories of
"Computer" ( regex : "1|2|3"), but it's not really elegant.
Does somebody have a better idea/solution to filter the terms ?