Skip to content

Add a widget for multiselect facets with configurable operand #40

Open
@olanowak

Description

@olanowak

Do you plan to add support for multi-select facets?
Here is a little example of what I would like to accomplish:

title:
[x] a (1111)

  • b (222)
  • c (333)
    [x] d (4)

author:
[x] a (123123)
[x] b (123)

  • c

After checking facets (marked as [x]) I would like the query to look like this:
(title:a OR title:d) AND (author:a OR author:b)

I would like not checked facets to not disappear and that all of them have appropriate counts.
I tried to use James McKinney tips from this question https://groups.google.com/forum/#!msg/ajax-solr/F8f6f3BtlUE/i3kdQYg_wzEJ but the constructed query looks like
/solr/select?rows=25&facet=true&facet.field={!ex=title}title&facet.field={!ex=author}author&fq={!tag=title}title:a&fq={!tag=title}title:d&fq={!tag=author}author:a&fq={!tag=author}author:b
so the operator is AND and I don't know how to change it to OR. I'm stuck.

It would be great if there was multi-select widget with configurable operand so users wouldn't have to change something withing Your code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions