Edwin Yeo
Edwin Yeo

Reputation: 165

Single Filter tagged with multiple tags in Multi Select Faceting in Solr

Regarding the Multi Select Faceting, there is a feature whereby we can have a single filter tagged with multiple tags, like the following example: fq={!tag=tag1,tag2,tag3}my_field:my_filter

However, I have not been able to figure out the use and advantage of this. Anyone has any information on this? I am using Solr 7.4.0

Edwin

Upvotes: 0

Views: 281

Answers (1)

MatsLindh
MatsLindh

Reputation: 52802

Tagging filters are useful for excluding those filters when faceting. Multi-tagging is useful when certain filters should only apply to specific facets. To expand the example from the manual:

fq={!tag=dt}doctype:pdf&fq={!tag=cat}category:important&facet=true&facet.field={!ex=dt}doctype&facet.field={!ex=cat}category&facet.field={ex=cat,dt}author

In this case you can exclude the doctype filter for the doctype facet, and exclude the category filter for the category facet, while excluding both when faceting on author.

Upvotes: 1

Related Questions