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 2224ACC12 for ; Wed, 7 Jan 2015 21:17:16 +0000 (UTC) Received: (qmail 24719 invoked by uid 500); 7 Jan 2015 21:17:15 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 24663 invoked by uid 500); 7 Jan 2015 21:17:15 -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 24306 invoked by uid 99); 7 Jan 2015 21:17:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 21:17:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jack.krupansky@gmail.com designates 74.125.82.179 as permitted sender) Received: from [74.125.82.179] (HELO mail-we0-f179.google.com) (74.125.82.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 21:16:43 +0000 Received: by mail-we0-f179.google.com with SMTP id q59so1892382wes.38 for ; Wed, 07 Jan 2015 13:15:12 -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=yKaoN9nmPEsOk3kyWv/uj0UpA5acdbLSZd4RLdWx0aA=; b=Yf38RzWkRoO6wSNXg5YIqW6alRRLdZcxKVhi2hY9A00L11+qxEVwnt1wltelO8va5T Qi7OBJRBH31a6qsWUzNKno1vYIUjkm0LjmbDpkzkeLnyMRCGtyg0KHxJ3HnxGF5m8zJJ hlCygr5Z2tucaAmgjZwyMZB07Niqs9d9zDMlGqhtr7m04YxRqKjlvhjnFhiR6L/H0uHC hIcskuLnUAsm0gHpJ9fzBjp+uAF0bF7e5xBjlHcNwB1HTLyLyhUFKEyk7PfMpVmlvwzl ZsA7Xuf/j9L0mKFFWB4kltJ2ns0il+jRRMgYy2W27lbCv+Czm1GmS+8O3TehTSMNgxlJ 0JWQ== MIME-Version: 1.0 X-Received: by 10.194.59.33 with SMTP id w1mr10488754wjq.123.1420665312465; Wed, 07 Jan 2015 13:15:12 -0800 (PST) Received: by 10.27.48.204 with HTTP; Wed, 7 Jan 2015 13:15:12 -0800 (PST) In-Reply-To: References: <9cdb4c8f9e3c4a6bb86419b044794bc3@Exchange2013.mysigndomain.corp> Date: Wed, 7 Jan 2015 16:15:12 -0500 Message-ID: Subject: Re: Looking for docs that have certain fields empty (an/or not set) From: Jack Krupansky To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7ba974d24b5b6f050c166bc2 X-Virus-Checked: Checked by ClamAV on apache.org --047d7ba974d24b5b6f050c166bc2 Content-Type: text/plain; charset=UTF-8 The pure negative query should work fine as a top level query - it's just when nested as a sub-query within parentheses that it misbehaves. -- Jack Krupansky On Wed, Jan 7, 2015 at 11:30 AM, Erick Erickson 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 > 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 > > --047d7ba974d24b5b6f050c166bc2--