lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Collins <chris_j_coll...@yahoo.com>
Subject Re: Search for documents where field does not exist?
Date Fri, 17 Jun 2005 19:46:21 GMT
I dont believe you can.  What you can do is index a NULL term.  That is, a term
that will not occur naturally in your index.  Then you can do such a search:

field:NULL

This requires you to index NULL when you know the field is going to be empty.

C

--- Dan Armbrust <daniel.armbrust.list@gmail.com> wrote:

> I'm pretty sure the answer is no.. but I'll check with the guru's anyway...
> 
> In my collection of documents, I have a non-tokenized field that only 
> occurs 0 or 1 time per document.
> 
> It is possible to create a query so that a documents would be returned if
> 
> (field == "some value" OR field does not exist)
> 
> documents would not be returned if
> (field == "some other value")
> 
> 
> Thanks,
> 
> Dan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 




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