Try negating by using a range query like (-persons:[* TO *])
I've always used this and it has always worked for me.

On Sun, 14 Feb 2016, 18:51 Salman Ansari <salman.rah...@gmail.com> wrote:

> Hi,
>
> I think what I am asking should be easy to do but for some reasons I am
> facing issues in making that happen. The issue is that I want
> include/exclude some fields from my Solr query. All the fields that I need
> to include are multi valued int fields. When I include the fields I have
> the following query
>
> http://
>
> [MySolrServer]/solr/[Collection]/select?q=(persons:*)AND(places:*)AND(orgs:*)
> This does return the desired result. However, when I negate the values
>
> http://
>
> [MySolrServer]/solr/[Collection]/select?q=(-persons:*)AND(-places:*)AND(-orgs:*)
> This returns 0 documents although there are a lot of documents that have
> all those fields empty.
>
> Any ideas why this is happening?
>
> Appreciate any comments/feedback.
>
> Regards,
> Salman
>
-- 
Regards,
Binoy Dalal

Reply via email to