Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 76729 invoked from network); 10 Feb 2005 18:19:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Feb 2005 18:19:12 -0000 Received: (qmail 93070 invoked by uid 500); 10 Feb 2005 18:19:07 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 93035 invoked by uid 500); 10 Feb 2005 18:19:07 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 93005 invoked by uid 99); 10 Feb 2005 18:19:07 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from Unknown (HELO mail.interoperate.com) (65.121.33.9) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 10 Feb 2005 10:19:05 -0800 Received: from imobile2 ([192.168.1.222]) by mail.interoperate.com (8.12.8/8.12.8) with SMTP id j1AIJ3vN020328 for ; Thu, 10 Feb 2005 11:19:04 -0700 Message-ID: <047201c50f9d$005e0150$de01a8c0@imobile2> From: "aaz" To: "Lucene Users List" References: <045a01c50f9a$abf83d80$de01a8c0@imobile2> <1108058865.5357.19.camel@saturn> Subject: Re: != queries Date: Thu, 10 Feb 2005 11:19:03 -0700 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Ok, that makes sense. Any suggestions on how to AND that prohibited clause with a query to get everything? ----- Original Message ----- From: "Miles Barr" To: "Lucene Users List" Sent: Thursday, February 10, 2005 11:07 AM Subject: Re: != queries > On Thu, 2005-02-10 at 11:02 -0700, aaz wrote: >> I have an index with field "documentNumber". There are 10 documents. One >> of the documents has documentNumber A5058970 >> >> I want to return all matches where documentNumber != A505*. I should get >> 9 docs back. >> >> I construct a query like >> >> wq = WildcardQuery("documentNumber","a505*") >> >> BooleanQuery bq = new BooleanQuery(); >> bq.addQuery(wq,false,true); >> >> I always get no results for this type of query. >> >> Ideas? > > A restriction can only filter out search results and not add to them. So > the search is starting with an empty set, then trying to filter out the > results with a document number starting A505, i.e. doing nothing. > > > > > -- > Miles Barr > Runtime Collective Ltd. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org