[ 
http://issues.apache.org/jira/browse/SOLR-80?page=comments#action_12457904 ] 
            
Hoss Man commented on SOLR-80:
------------------------------


With ConstantScoreQuery and QueryFilter it's basically possible to do any 
negating clauses as either a boolean clause or as a filter ... the big trade 
off decission really comes down to how big is the negated set, and is it worth 
caching independently of the main query.

if you're trying to exclude only a handful of items by ID, then BooleanClauses 
make a lot of sense based on the way the BooleanQuery Scorers work ... but if 
you are trying to exclude 9/10ths of the documents in your index using a 
complicated query expression, it starts being more worth while to generate that 
set once and cache it for reuse as a Filter -- but there are still trade off 
questions to be asked about wether or not caching the set -A is as efficient as 
caching the set A (from a memory standpoint)



> negative filter queries
> -----------------------
>
>                 Key: SOLR-80
>                 URL: http://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: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to