Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 40663 invoked from network); 30 Jul 2010 15:19:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jul 2010 15:19:58 -0000 Received: (qmail 26172 invoked by uid 500); 30 Jul 2010 15:19:55 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 26102 invoked by uid 500); 30 Jul 2010 15:19:55 -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 26094 invoked by uid 99); 30 Jul 2010 15:19:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 15:19:55 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.191.69.81] (HELO web32904.mail.mud.yahoo.com) (209.191.69.81) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 30 Jul 2010 15:19:46 +0000 Received: (qmail 15952 invoked by uid 60001); 30 Jul 2010 15:19:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1280503164; bh=M0BRECpMUNUeXbo23jIDAtSIO23hfBF7ZtHOqZiDh/Q=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=gMio+O30Io1SXfxZgaYmnVSsyGp0wrzTRZsVnWiDA1duPFty3p2q8J2zSKNVW4jPcNN/TxZVUbgCO1iQtqo2X8n97623yJOTruDuBtaA04FFCnlF7eKarygToAWM+d4z7Kn0QVH4oRAR/5y2pEpKKaoLRfhEPUNBMH72E8eofK0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=u3tjG981UbgAKIcj+GLJBb8L31HoxZNSDdVuBj2L5dIbQhxWKjZyCqqqtZyXwpwRAKXRGCvgaIrlV990Y8RZqSar06X3h3L+4T1tUEHiw1qQuz2DJ+t3FGIDrUUNJthTjl1Zc+11HfRymLRdg1lF9j5ZNciFDVUrSH9uZFDN84k=; Message-ID: <101578.94509.qm@web32904.mail.mud.yahoo.com> X-YMail-OSG: PzBTZcwVM1lBbQ0jWslIjC7Vssl6BGU9Vk5c7up5QoIu7B9 VYjbWyH8pN2S79bcrm8WkmePavycGJENivgtQlj.uME90CZId3BdIARtxhtQ q5RP0xplq89SQwnUD4vrcF5wT6gBEE65.gf9LImfHEztAiCRlwUrfVCm_6gp Ka.w74ueOwUYDv31ondBQQlNklMQq9yYpJuKU7TWB_UyMjhw6d0m2XxRLw.w UG6Ui_7KuqBon88yWD69foeAiQZO9lD8PPtFT7FbuN5_B__zIM6Xn1UkOx_7 nemacrdX05SLyhlT0b4Xr1zBaOzbM6mO1TyNRchE9nWvzcwgQo5865QpIez9 VTQ9qh3hriayJrmk- Received: from [72.36.94.20] by web32904.mail.mud.yahoo.com via HTTP; Fri, 30 Jul 2010 08:19:24 PDT X-Mailer: YahooMailRC/420.4 YahooMailWebService/0.8.105.279950 References: <182367.89000.qm@web32901.mail.mud.yahoo.com> Date: Fri, 30 Jul 2010 08:19:24 -0700 (PDT) From: Justin Subject: Re: InverseWildcardQuery To: java-user@lucene.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org I think you're suggesting, for example, "*:* AND -myfield:foo*". If my document contains "myfield:foobar" and "myfield:dog", the document would be thrown out because of the first field. I want to keep the document because the second field does not match. Related, is there a way to use wildcards to match the beginning of the field? org.apache.lucene.queryParser.ParseException: Cannot parse '*:* AND -myfield:*foo*': '*' or '?' not allowed as first character in WildcardQuery ----- Original Message ---- From: Ian Lea To: java-user@lucene.apache.org Sent: Fri, July 30, 2010 9:38:26 AM Subject: Re: InverseWildcardQuery I can't get my head round exactly what you want, but a standard lucene technique is a BooleanQuery holding a MatchAllDocsQuery and a second query, can be anything, having Occur.MUST_NOT. I guess that is a way of inverting the second query. -- Ian. On Fri, Jul 30, 2010 at 3:29 PM, Justin wrote: > Any hints on making something like an InverseWildcardQuery? > > We're trying to find all documents that have at least one field that doesn't > match the wildcard query. > > Or is there a way to inverse any particular query? > > > > > --------------------------------------------------------------------- > 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