I want alist of cities in facet for a particular list of states in fq.
So my query is:
fq: {!tag=state}state_id:(25 41)
facet query: state_id:(25 41)
facet field: {!ex=state}city_id
This works perfectly fine in Solr Admin, whereas when I query it using Solarium:
$facetSet->createFacetQuery('city')->setQuery($facet_q);
$facetSet->createFacetField(array('field'=>'city','exclude'=>'state'));
it gives an empty result.
Thanks in advance.
This is pretty old but the same question is relevant also today.
You can do the following with solarium v6:
This will be translated to:
Also:
This will be translated to:
So as you can see addTag and addExclude should be used.