Unable to use Tagging and excluding Filters

2019-04-02 17:04发布

问题:

I have 2 Facets color and shape.

Color: Red Green yellow

Shape: Circle Square

Now I want to use Tagging and excluding Filters for both these Facet. So if I select "Red" the green and yellow should be present in facet list and all shapes as well

I read: http://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters

But unable to implement it in my setup.

回答1:

This worked fine for me.

select?q={!tag=dt1}color:red&fq={!tag=dt2}shape:*&facet=true&facet.field={!ex=dt1}color&facet.field={!ex=dt2}shape



回答2:

Try

http://localhost:8983/solr/collection1/select?q={!tag=dt1}color:red&fq={!tag=dt2}shape:*&facet=true&facet.field={!ex=dt1}color&facet.field={!ex=dt2}shape