Hello,

I'm using Solr 4.2 and am trying to get a specific value (blue) or null field 
(no color) returned by my filter query. My results should yield 3 documents (If 
I execute the two separate filters in different queries, I get 2 hits for one 
query and 1 for the other).

I've tried this (blue or no color set):

select?q=*:*&fq=(-color:[* TO *] OR color:blue)

When that returned zero hits, I added a new field called "color.not_null" and 
am setting it only if a color is defined (thinking there was a problem with 
using the same field name).

select?q=*:*&fq=(-color.not_null:[* TO *] OR color:blue)

That too yielded zero results. Again, executing them separately does return 
hits (3).

Does anyone see what I might be doing wrong? Thanks in advance,
Kristian

Reply via email to