Quick reply: Use a different tag/ex value for each field.
> On May 16, 2016, at 04:42, Manohar Sripada <manohar...@gmail.com> wrote: > > We have a similar requirement as that of mentioned in solr wiki - > http://wiki.apache.org/solr/SimpleFacetParameters#Multi-Select_Faceting_and_LocalParams > > Here, the example given works when single facet is selected, where I can > get the counts of other facet values. > > > *q=*:*&start=0&rows=10&facet=true&facet.limit=5&facet.mincount=1&* >> *facet.field=country&* >> *facet.field={!ex=dt}industries&fq={!tag=dt}industries:("services")* > > >> * Facet Response: * > > =====*industries*===== > > [x] Services (1010) > > [ ] Manufacturing (1002) > > [ ] Finance (221) > > [ ] Wholesale Trade (101) > > [ ] Transportation (50) > > > > =====*country*===== > > [ ] USA (450) > > [ ] Mexico (135) > > [ ] Germany (122) > > [ ] India (101) > > [ ] Australia (54) > > > > In the above query, I was trying to retrieve the facet counts for > industries facet & country facet, but with "services" selected. This > scenario works well. Now, when I select "USA", the results are narrowed > down to 450. However, the country facet counts aren't considering the > industries filter selected & industries facet count isn't considering > country filter selected. Below is the solr query and corresponding facet > counts. > > > *q=*:*&start=0&rows=10&facet=true&facet.limit=5&facet.mincount=1&facet.field={!ex=dt}country&facet.field={!ex=dt}industries&fq={!tag=dt}industries:("services")&fq={tag=dt}country:("USA")* > > >> * Facet Response: * > > =====*industries*===== > > [x] Services (1010) > > [ ] Manufacturing (1002) > > [ ] Finance (221) > > [ ] Wholesale Trade (101) > > [ ] Transportation (50) > > > > =====*country*===== > > [x] USA (1312) > > [ ] Mexico (1290) > > [ ] Canada (1192) > > [ ] China (900) > > [ ] Japan (450) > > > > I was expecting *"country" *facet count to be as it was before (i.e. to > consider industries filter) and *"industries" *to consider the country > filter while calculating facet counts. Can someone help me here?