lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aviran" <>
Subject RE: how to find field that has any value
Date Mon, 11 Oct 2004 14:30:25 GMT
You can try to use a range query something like test:[null TO
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


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

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:
For additional commands, e-mail:

View raw message