I'm running into some trouble to setup a search in Drupal between some related nodes with some decent filters.

I've tried to use search_api, search_api_db & the facet_api, it work's like a charm except that there doesn't seem to be a functionality to select multiple options to filter on. (or functionality).

For example when you've got a list with some options:

  • Option 1 (10)
  • Option 2 (2)
  • Option 3 (8)

When you click Option 1, facet_api will only show:

  • x Option 1 (10)

I'd like the possibility to select multiple options, and extend my filter.

  • x Option 1 (10)
  • Option 2 (2)
  • x Option 3 (8)

While searching I ran into some issues posted at drupal.org that state that it's possible with search_api_solr but not with search_api_db.

http://drupal.org/node/1390586 (Implement support for search_api_facets_operator_or - search_api_db)

http://drupal.org/node/1679974 (Allow multiple checkboxes to be selected in a facet - FacetAPI )

My question is: Is it possible with the search_api, search_api_db and facet_api to let this work, or are there other solutions out there that will provide the functionality described above?

It needs to work with multiple facets and update the number of results behind the options.

  • do you know in advance what these facets are going to be? or is it random texts with in the content spread across content types and taxonomies? – Mohammed Shameem Feb 1 '13 at 14:51
  • Hi, at this moment i use the content of select fields from the node like color and type of a product for the facets. – Mathijs Feb 1 '13 at 14:56
  • why dont you use views filter then? – Mohammed Shameem Feb 1 '13 at 15:00
  • I tried to use the view filter and expose it to the users. But it doesn't show the number of items that met that criteria. For example, if someone selects a option, and there is only 1 item with the color blue it needs to show (1) behind blue. If is select another option that could be another number. – Mathijs Feb 1 '13 at 15:02
  • let me know if this is how you want it. openoman.com/search/results/shipping – Mohammed Shameem Feb 1 '13 at 15:17

I think you can change your facets to using the facetapi to use checkboxes instead of links. I believe you can go into your index and then edit the facet and choose under Display Widget: Links with checkboxes.

  • This really isn't much of an answer. Can you provide any more information? – Letharion Feb 8 '13 at 20:02
  • I edited my answer above. – gmclelland Feb 8 '13 at 23:16

The answer to your question is as follows:

1) Within that facets filters - un-check "Do not display active items"

Configure facet filters - un-check 'Do not display active items'

2) Within that facets display - select "Or" - N.B. This option will only be available on Solr driven servers!

Within that facets display - select 'Or' - N.B. This option will only be available on Solr driven servers!

I hope that helps!

Originally found here: Allow multiple check-boxes to be selected on a facet

Thanks goes to: deggertsen


You could achieve multiple facet selections with Apachesolr module:

This module integrates Drupal with the Apache Solr search platform. Solr search can be used as a replacement for core content search and boasts both extra features and better performance. If you're looking for Apache Solr integration, this is possibly the best option available.

  • The OP already has search setup with Search API and simply wants to change the facets. Facets for both Search API and Apachesolr module are provided by Facet API, so switching Solr module is irrelevant. – Letharion Feb 8 '13 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.