On 5/10/2018 11:49 AM, Deepak Goel wrote:
Sorry but I am unclear about - "What if there is no default value and the
field does not contain anything"? What does Solr pass on to Lucene? Or is
the field itself omitted from the document?

If there is no default value and the field doesn't exist in what's indexed, then nothing is sent to Lucene for that field. The Lucene index will have nothing in it for that field.  Pro tip: The empty string is not the same thing as no value.

What if I want to query for documents where the field is not used? Is that
possible?

This is the best performing approach for finding documents where a field doesn't exist:

q=*:* -field:[* TO *]

Summary: all documents, minus those where the field value is in an all-inclusive range.

Thanks,
Shawn

Reply via email to