lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Tschumy <b...@otherwise.com>
Subject Re: Searching for doc without a field
Date Fri, 04 Feb 2005 16:29:05 GMT

On Feb 4, 2005, at 10:19 AM, Bill Tschumy wrote:

>
> On Feb 3, 2005, at 2:04 PM, Paul Elschot wrote:
>
>> 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
>
> Paul,
>
> Thanks for the suggestion, but I need to do this on an existing 
> database as it is.
>
> It just occurred to me that I should try a query on the field with a 
> value of NULL.  Don't know if that will work or not.

Nope, using null as a search value just result in a 
NullPointerException.

-- 
Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com


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