lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AHMET ARSLAN <iori...@yahoo.com>
Subject Re: NOT combined with OR is not getting exected results
Date Wed, 02 Dec 2009 17:00:52 GMT
 http://localhost:8983/solr/select?q=%28NOT%20categoryType:%22MEDIATYPE%22%29   :gives
> 292289 results
> 
> 
> http://localhost:8983/solr/select?q=fmMediaType:%22text%22   :gives
> 530 results
> 
> 
> http://localhost:8983/solr/select?q=%28NOT%20categoryType:%22MEDIATYPE%22%29%20OR%20fmMediaType:%22text%22   :gives
> 530 results
> 
> I expected a number higher than the first query.
> 

NOT operator behaves a little bit different. It is like a filter. You just can't combine OR
and NOT directly.

Try this:
q=(categoryType:[* TO* ] NOT categoryType:"MEDIATYPE") OR fmMediaType:"text"


Solr allows q=(NOT categoryType:"MEDIATYPE") query but it can be seen as q= *:* NOT categoryType:"MEDIATYPE"

Hope this helps.




      

Mime
View raw message