lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "German Kondolf" <german.kond...@gmail.com>
Subject Re: Searching for null (empty) fields, how to use -field:[* TO *]
Date Tue, 11 Mar 2008 14:41:12 GMT
*:* is parsed as a MatchAllDocsQuery?

I've got some preformance issues in Lucene 2.2 because
MatchAllDocsQuery ask for a "isDeleted()" for every document, I didn't
tried it in 2.3.

On Tue, Mar 11, 2008 at 11:34 AM, Mark Miller <markrmiller@gmail.com> wrote:
> You cannot have a purely negative query like you can in Solr.
>
>  Try: *:* -MY_FIELD_NAME:[* TO *]
>
> thogau wrote:
>  > Hi,
>  >
>  >
>  > I browsed the forum searching for a way to make a query that retrieves
>  > document that do not have any value for a given field (say MY_FIELD_NAME).
>  >
>  >
>  > I read several posts advising to use this syntax : -MY_FIELD_NAME:[* TO *]
>  > However, I am not able to have it working...
>  >
>  >
>  > I have 2 documents, the first one has a value for the field MY_FIELD_NAME
>  > (In Luke, I can see the value) and the second one has no value for it (In
>  > Luke, I can see&lt;not available&gt;)
>  >
>  >
>  > I would expect the query MY_FIELD_NAME:[* TO *] to retrieve the document
>  > which has a value for the field MY_FIELD_NAME but it doesn't (Nevertheless
>  > MY_FIELD_NAME:[a* TO z*] retrieves it)
>  >
>  >
>  > Also, I would expect the query -MY_FIELD_NAME:[* TO *] to retrieve the
>  > document which has a NO value for the field MY_FIELD_NAME but it doesn't
>  > either...
>  >
>  >
>  > I guess I am missing something obvious but I am stuck... Anybody can help to
>  > understand what I am doing wrong?
>  >
>  >
>
>  ---------------------------------------------------------------------
>  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