With the current apachesolr module you can't reach a dead end by clicking facet links. However, with apache solr views, it is possible, so I updated the block implementation to handle this case.

I figured I would motivate this change with the following urls:
Filter nodes by terms "dad" and "mom": http://www.mothersclick.com/conversations/all/7575,9363
Filter nodes by terms "dad" and "mom" by type "photos": http://www.mothersclick.com/conversations/photo/7575,9363

The first link shows that only two nodes match the term filter, both are type Question. But the secondary navigation allows the user to apply the type filter to this search.

Once the user clicks the Photos link, what needs to be shown there is a set of unclick links so that the user can unapply the term filters. And that is what this patch provides.

What you guys think? I know its not possible to achieve a dead end with Apache Solr module, but this makes the module more robust as other modules like Apache Solr Views abuse it :-D

Comments

Scott Reynolds’s picture

Title: Facet yourslf to a dead end - provide unclick links for taxonomy facet block » Facet yourself to a dead end - provide unclick links for taxonomy facet block
StatusFileSize
new125.5 KB
new144.98 KB

Hopfully, this patch will pass QA with all other changesets and go live tonight. So I took screen shots.

All.png deals with just filtering by the terms

photo.png deals with filter by the terms and type photo

robertdouglass’s picture

Hmmm. I'm leaning towards asking you to maintain this one for yourselves. Please try to convince me otherwise.

Scott Reynolds’s picture

Shouldn't their be an unclick link whenever a filter is applied? Even if that applying that filter doesn't return any results?

damienmckenna’s picture

There should be a standard way to remove selected filters, especially with some of the complicated facet structures that can be built.

jpmckinney’s picture

Status: Needs review » Fixed

Patch no longer applies. The code that the patch was modifying is probably currently in apachesolr_search_taxonomy_facet_block(). I'm quite sure this is no longer an issue with the new code (it's been a year). If this is still an issue please re-open this issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.