On 8/9/07, Pieter Berkel <[EMAIL PROTECTED]> wrote: > On 09/08/07, Yonik Seeley <[EMAIL PROTECTED] > wrote: > > > > A null field (meaning no value) can be indexed by leaving it out, and > > searched with a negative filter or query clause: > > -field:[* TO *] > > > > -Yonik > > > > > Ah, that's a much more elegant solution, is this query syntax specific to > Solr?
Lucene can do +something -field:[* TO *] But being able to do a pure negative query is a recent addition to Solr (it's really most useful for filters). Which reminds me, it doesn't look like that's been added to http://wiki.apache.org/solr/SolrQuerySyntax > (I don't recall seeing it in the Lucene query parser syntax > documentation). Also, is there a simple method to search for fields > containing an empty string? Wouldn't foo:"" work for a string (untokenized) field? For a tokenized field that typically eliminates whitespace, no zero length strings would be indexed anyway. -Yonik