lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Re: Optimum way to find all document without particular field
Date Thu, 05 Mar 2009 01:26:08 GMT
Chris Lu wrote:
> Allahbaksh,
> If you ONLY want to find all document with a particular field that is 
> not null, you can loop through the TermEnum and TermDocs to find all the 
> document ids.
> But this can not easily be combined with other queries.

Surely this would be equivalent to a PrefixQuery with a prefix of "". 
Assuming the query parser is well behaved (I can no longer remember 
whether the default one is or not), field:* should create one.

This is assuming you have already indexed the data.  If you can reindex 
then clearly adding a placeholder value for "no content" is more efficient.


Daniel Noll                            Forensic and eDiscovery Software
Senior Developer                              The world's most advanced
Nuix                                                email data analysis                                and eDiscovery software

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

View raw message