solr search for documents where a field doesn't exist

Midhat picture Midhat · Dec 6, 2010 · Viewed 34.8k times · Source

How do I search for those document in a SOLR index which do not contain a specified field?

Answer

Mauricio Scheffer picture Mauricio Scheffer · Dec 6, 2010

-field:[* TO *]

In SolrNet, use a negated SolrHasValueQuery