Greetings!
I need to implement something that I'd call a taxonomy-based search results refining. Once implemented it will allow a user to refine search result by constraining displayed nodes to only those, which are tagged by a particular set of taxonomy terms. I can imagine this as a special block displayed on a search results page. This block displays current set of terms used to constrain search results and set of terms, which are also used in the currently displayed result set. Clicking on a term in later set will add that term to the filter and repeat the search. Clicking on a term in former set will drop that term from the filter and also repeat the search. Filtering itself is performed by including in the result set only those nodes, which have all terms which are included in the filter (and probably some which are not).
I've tried to search drupal.org for something like "search results refining" and "term-based refining" but no luck. The only thing I've found in Refine module, but as far as I understood it is not designed to be used togather with the search module.
Could anyone point me to a module, which implements such functionality (best case), or at least give some advice about possible way to implement this functionality by myself.
Thanks in advance!
Comments
Views can do it
You can use the views module to do something like this ... Create a new view, and add an exposed filter for "search index" and an exposed filter for the taxonomy vocab you want to refine by. You might also want to have a little look at the views_fastsearch module - which provides a faster and more powerful filter based on the search index.
The only thing you wont get will be a link between the standard search box and your new view - if you want to have a search box on the top of each page then you'll have to implement a custom form (that pokes its results back to your new view) and then pop this into a block ...
Cheers,
Mike,
Computerminds offer Drupal development, consulting and training
Mike,
Computerminds offer Drupal development, consulting and training
Step By Step
There is a step by step article.
http://acquia.com/blog/s-files-adding-search-fields-and-filters-views