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.