lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Re: Match all documents with non empty field
Date Thu, 03 Jul 2008 02:47:32 GMT
Patrick wrote:
> Hi,
> Can't seem to wrap my head around how to go about it.
> I want to retrieve all documents where a certain field in not empty.
> What would be the best way to do it?

The most trivial way would be to use a PrefixQuery with an empty string.

It won't be efficient unless you wrap it in a QueryFilter to cache the 
result, but I found it to be "fast enough" even for relatively large 
document sets.


Daniel Noll

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message