lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Match all documents with non empty field
Date Thu, 03 Jul 2008 03:00:49 GMT
Daniel Noll wrote:
> 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
>
>
Also, search the archive...I think there is something you can do like 
*:* NOT [* TO *]

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message