[ 
https://issues.apache.org/jira/browse/SOLR-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465857
 ] 

Yonik Seeley commented on SOLR-80:
----------------------------------

>From an interface point of view, I'm heavily leaning toward getting rid of the 
>restriction of lucene queries having to be all negative.  This would allow 
>using a negative-only query anywhere one currently can use a positive query.

One could simply and naturally do fq=-id:10 to filter out a single document.


> negative filter queries
> -----------------------
>
>                 Key: SOLR-80
>                 URL: https://issues.apache.org/jira/browse/SOLR-80
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Yonik Seeley
>
> There is a need for negative filter queries to avoid long filter generation 
> times and large caching requirements.
> Currently, if someone wants to filter out a small number of documents, they 
> must specify the complete set of documents to express those negative 
> conditions against.  
> q=foo&fq=id:[* TO *] -id:101
> In this example, to filter out a single document, the complete set of 
> documents (minus one) is generated, and a large bitset is cached.  You could 
> also add the restriction to the main query, but that doesn't work with the 
> dismax handler which doesn't have a facility for this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to