When the default search has custom filters enabled and a facet block is displayed on a non-search path the facet block doesn't take into consideration the filters.
For instance, I display a "Quick Search" bar on the home page of a site that displays the main categories of items (using facets). I have a filter on my default search page that hides items that are no longer active (but can still be searched via other searches, but shouldn't be highlighted). The counts after the categories in the facet list include these inactive items as well, even though the default search page will never show them.
This can be fixed by passing the custom filters when running the "empty search."
Comment | File | Size | Author |
---|---|---|---|
#1 | apachesolr-facet-custom-filter-1916558-1.patch | 1.18 KB | jwalz |
Comments
Comment #1
jwalz CreditAttribution: jwalz commentedThis is the patch I'm currently using in my install. I don't think this breaks anything, but I don't have anywhere a deep enough understanding of all the inner workings of this module to say for sure.
Comment #2
pwolanin CreditAttribution: pwolanin commentedlooks reasonable. This would be worth a test case if possible.
Comment #3
Nick_vhGoing to commit this one and hopefully we can add a small sprint to add tons of tests to the suite later. This otherwise might get blocked. Does need backport though