lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Searching for doc without a field
Date Thu, 03 Feb 2005 20:04:46 GMT
On Thursday 03 February 2005 20:18, Bill Tschumy wrote:
> Is there any way to construct a query to locate all documents without a 
> specific field?  By this I mean the Document was created without ever 
> having that field added to it.

One way is to add an extra document field containing the field
names of all (other) indexed fields in the document.
Assuming there is always a primary key field the query is then:

+fieldnames:primarykeyfield -fieldnames:specificfield

Regards,
Paul Elschot


---------------------------------------------------------------------
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