lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clemens Wyss DEV <clemens...@mysign.ch>
Subject AW: Looking for docs that have certain fields empty (an/or not set)
Date Thu, 08 Jan 2015 06:24:04 GMT
Thanks for the input. In fact, we are using this very query as a Solr queryFilter (i.e. qf).
Is there a specific (Lucene query) syntax to formulate (force the usage of) such a FieldValueFilter?

-----Urspr√ľngliche Nachricht-----
Von: Ahmet Arslan [mailto:iorixxx@yahoo.com.INVALID] 
Gesendet: Mittwoch, 7. Januar 2015 17:41
An: java-user@lucene.apache.org
Betreff: Re: Looking for docs that have certain fields empty (an/or not set)

Hi Clemens,

Since you are a lucene user, you might be interested in Uwe's response on a similar topic
: 
http://find.searchhub.org/document/abb73b45a48cb89e

Ahmet


On Wednesday, January 7, 2015 6:30 PM, Erick Erickson <erickerickson@gmail.com> wrote:
Should be, but it's a bit confusing because the query syntax is not pure boolean, so there's
no set to take away the docs with entries in field 1, you need the match all docs bit, i.e.
*:* -field1:[* TO *]

(That's asterisk:asterisk -field1:[* TO *] in case the silly list interprets the asterisks
as markup)

There's some special magic in filter query processing to handle this case, but not in the
main query parser.

Best,
Erick

On Wed, Jan 7, 2015 at 8:14 AM, Clemens Wyss DEV <clemensdev@mysign.ch> wrote:
> Say I wanted to find documents which have no content in "field1" (or dosuments that have
no field 'field1'), wouldn't that be the following query?
> -field1:[* TO *]
>
> Thanks for you help
> Clemens
>
> ---------------------------------------------------------------------
> 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

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