You can try to use a range query something like test:[null TO
"zzzzzzzzzzzzzzzz"]
Please note that you might get TooManyBooleanClause Exception, if you have
too many of them.

The other thing you can use is with the operator NOT. For all the Empty
fields you can fill them with a string lest say "empty" and then query for
-test:empty

Aviran

-----Original Message-----
From: MATL (Mats Lindberg) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 06, 2004 16:27 PM
To: Lucene Users List
Subject: how to find field that has any value


Hello
 
i have a probably simple question for some of you.
 
Since lucene does not allow a query to start with a wild card (* or ?) how
would i find all documents in lets say field test that has something in that
field, or is not empty.
 
my first thought would be to do something like this.
 
test:________                (cause the value ______ isn't very likely
to be present)
 
 
test:*                            (would be the correct way, i guess,
but lucene doesn't allow that)
 
 
does anyone have a greater idea.
 
Best regards,
Mats Lindberg



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to