Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3649F17EF5 for ; Wed, 7 Jan 2015 16:31:54 +0000 (UTC) Received: (qmail 34723 invoked by uid 500); 7 Jan 2015 16:31:53 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 34661 invoked by uid 500); 7 Jan 2015 16:31:53 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 34648 invoked by uid 99); 7 Jan 2015 16:31:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 16:31:51 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erickerickson@gmail.com designates 209.85.213.175 as permitted sender) Received: from [209.85.213.175] (HELO mail-ig0-f175.google.com) (209.85.213.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 16:31:47 +0000 Received: by mail-ig0-f175.google.com with SMTP id h15so6094166igd.14 for ; Wed, 07 Jan 2015 08:30:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0zUfpQZfg4mpQCAaDZIvLN4LlkcOtkoMqFtuy+dp6BY=; b=g8mVwQJphMu68gD7ZH3kgiE3nQS3r+CUdb6o5ZWBDeXnh2l0hLfZsO8LTDs5qRfyo9 CxvFdBySsdtMFr/TF9OOqqXbGMIc9vgeR7t4PhumM2QavlXrIz9+ThC0hHVtEShYPTAX R7afeDYHk00XibnNgDLW0+qyYDkSgKsA9+mh9C4GWETI+a/udZF1N37SIuqdHiM5uXv2 Wwge9MUD0kl5nBcWxknOk0XGBa+sXlgdNJnymfswMjqaZ4kqfHpByy1yywH6sZJgUS6A hHsDZsXPBWoa35GmScvLEzJcKOq6nTsQK+K87AshIZpFeBguRteH1wYJgUCtJZ7n7KFd uTQA== MIME-Version: 1.0 X-Received: by 10.50.43.169 with SMTP id x9mr4604457igl.28.1420648242009; Wed, 07 Jan 2015 08:30:42 -0800 (PST) Received: by 10.107.153.5 with HTTP; Wed, 7 Jan 2015 08:30:41 -0800 (PST) In-Reply-To: <9cdb4c8f9e3c4a6bb86419b044794bc3@Exchange2013.mysigndomain.corp> References: <9cdb4c8f9e3c4a6bb86419b044794bc3@Exchange2013.mysigndomain.corp> Date: Wed, 7 Jan 2015 08:30:41 -0800 Message-ID: Subject: Re: Looking for docs that have certain fields empty (an/or not set) From: Erick Erickson To: java-user Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org 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 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