0

How to change drupal facets solr query operator from "AND" to "OR"?

We're working on a drupal based Job Board and want our faceted search to provide results that match parts of selected facets.

E.g. the query has the facets "facet1", "facet2", "facet3", "facet4" - all from different taxonomies and thus in different facet blocks

standard behaviour is that all results necessarily contain ALL facets, but need to list results that only parts. E.g.:

  1. "facet1", "facet2", "facet3", "facet4"
  2. "facet1", "facet2", "facet4"
  3. "facet1", "facet3", "facet4"
  4. "facet3", "facet4"
  5. "facet1", "facet3"
  6. "facet3", "facet4
  7. "facet1"

How we can achieve this?

Community
  • 1
  • 1

1 Answers1

0

Try this: Configure the display of your facet and under global settings change the operator from AND to OR.

To do this, go to admin/config/search/apachesolr/settings and click on Facets link under the configuration column, then in the operations column choose "configure display" for your facet, to edit your facet then scroll down and choose OR under the operator and save your configuration.

  • the problem is that this works only within a single facet and does not apply to combination of e.g. facet block 1 with facet block2 – user3918369 Nov 02 '16 at 14:26