Lance - where do you see a negative query not working with Solr? Should work fine as long as the field name is valid.

        Erik


On Aug 23, 2008, at 5:50 PM, Lance Norskog wrote:

And, a negative query does not work, so if this is the only clause, you have
to say:

*:* AND -field[* TO *]

Where *:* is a special code for "all documents".

It's like learning a language: there is the normal grammar, there are the
unusual cases, and then there are the bizarre slang expressions.

-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 23, 2008 12:16 PM
To: solr-user@lucene.apache.org
Subject: Re: How to know if a field is null?


On Aug 22, 2008, at 3:31 PM, Alexander Ramos Jardim wrote:
I'd like to know if there's a way to query for not having a field set.
Something like saying "I want all the docs that have field A empty".

Is that possible?

Sure is....

   -field:[* TO *]

that'll match all documents that do NOT have terms in "field"

        Erik



Reply via email to