lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Facet query - exlude main query
Date Tue, 21 Feb 2017 17:36:47 GMT

:  Solr3.1 <> Starting with Solr 3.1, the
: primary relevance query (i.e. the one normally specified by the *q* parameter)
: may also be excluded.
: But doesnt show me how to exlude it ??

same tag + ex local params, as you had in your example...

: 2. ....q={!tag=mq}blah&facet.field={!ex=tag_man,mq}manufacturer
: But  I still only get the facets WITH the main query  of "blah"

Can you give us a more more complete picture of what your data & full 
request & response looks like? ... it's working fine for me with Solr 6 
and the techproducts sample data (see below).

$ curl 'http://localhost:8983/solr/techproducts/query?rows=0&fq=%7B!tag=y%7dinStock:true&q=%7B!tag=x%7dname:ipod&facet=true&facet.field=inStock&facet.field=%7b!key=exclude_x+ex=x%7dinStock&facet.field=%7b!key=exclude_xy+ex=x,y%7dinStock'
        "{!key=exclude_x ex=x}inStock",
        "{!key=exclude_xy ex=x,y}inStock"],


View raw message