lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aviran" <amo...@infosciences.com>
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
"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:matl@nnit.com] 
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: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message