Hello,

I'm building out a search interface using Views, Search API, and Facet API. Consider a page displaying Publications, where we have facets for Publication Authors and Journals.

Let's say we have some facets that look like this:

- Publication Authors

[ ] Some Author
[ ] Another Author
[ ] Drupalista

- Journals

[ ] Drupal Watchdog
[ ] Time magazine
[ ] Smashing magazine

Here is my scenario. My client wants to be able to click on "Some Author" and filter the results to show only publications by "Some Author", but retain the facet checkboxes for Another Author and Drupalista. The idea being that the user could then click on "Drupalista" to expand the search results to include Drupalista and Some Author.

Currently, if you have the "AND" logic implemented for a Facet, then once the user clicks any of the checkboxes within a facet group, the other ones disappear. "OR" logic doesn't sufficiently filter the results the way the client wants, because it is across all realms.

In other words, what I want is "OR" logic within a facet category and "AND" logic across all categories.

So to summarize, current behavior with AND logic is:

- Publication Authors

[ ] Some Author
[ ] Another Author
[ ] Drupalista

User clicks on "Drupalista"

- Publication Authors

[X] Drupalista

Results are filtered to show only publications authored by "Drupalista". But the other checkboxes have disappeared.

Desired behavior:

- Publication Authors

[ ] Some Author
[ ] Another Author
[ ] Drupalista

User clicks on "Drupalista"

- Publication Authors

[ ] Some Author
[ ] Another Author
[X] Drupalista

Results are filtered to show only publications authored by "Drupalista", other checkboxes remain. If user then clicks on "Some Author", the results are expanded to include results by "Some Author" OR "Drupalista".

Is there a way to retain the facet checkboxes when using AND logic after a user has made an initial selection?

Comments

kostajh’s picture

Issue summary: View changes
kostajh’s picture

Issue summary: View changes
kostajh’s picture

Issue summary: View changes
cpliakas’s picture

Category: Task » Support request
PCateNumbersUSA’s picture

Would love to see this added as well.