Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 47486 invoked from network); 2 Feb 2007 09:21:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2007 09:21:24 -0000 Received: (qmail 35913 invoked by uid 500); 2 Feb 2007 09:21:29 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 35882 invoked by uid 500); 2 Feb 2007 09:21:29 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 35871 invoked by uid 99); 2 Feb 2007 09:21:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 01:21:29 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.12.10.212] (HELO web26001.mail.ukl.yahoo.com) (217.12.10.212) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 02 Feb 2007 01:21:18 -0800 Received: (qmail 29824 invoked by uid 60001); 2 Feb 2007 09:20:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=T6A5qbOA70LyyMOZkKnkyBKNcYrPZZCr6MnaMm3OJlShK1h3iM1mbtbOjddO0oCUWosX7Frx4GB2W8oK0l8545DKzcTh7CD9ou27kLmyAXkmaX9MkEVU2yOsLrYptYiZqxwjePdAOE+viQQTpFqMuANdnYxtpN7RswFiWiSwZSw=; X-YMail-OSG: PPn7omUVM1kHve2MVG5myKsxU4.v9u2Xj_Ym47NjDHRsA6CSWnUl8LylA3txmlA6TMT6AVZaIIUdqKbp9BU.obqvzr_bkVrHxWpAZvdc4k.zr1ekgFjhgWSknX3Ahe_PdnKhp3fBcjNhEV_S1txrM.gizqeJmo41M9CsEg4dJuz4e8ZorEBvz_k1Pw-- Received: from [193.36.230.96] by web26001.mail.ukl.yahoo.com via HTTP; Fri, 02 Feb 2007 09:20:56 GMT X-Mailer: YahooMailRC/368.3 YahooMailWebService/0.6.132.7 Date: Fri, 2 Feb 2007 09:20:56 +0000 (GMT) From: mark harwood Subject: Re: MatchAllDocs in BooleanQuery.rewrite To: java-dev@lucene.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <154588.29070.qm@web26001.mail.ukl.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org >>are there any legitimate usecases for calling rewrite other then when a S= earcher is about to execute the query?=0A=0AWhen using the highlighter it i= s recommended to use a rewritten query e.g. to get all the variations for a= fuzzy query.=0AHowever I don't think there should be a problem with the au= to-MatchAllDocs approach you suggest. =0AIncidentally, the "BooleanFilter" = class in contrib/queries adopts the same must/should/mustnot logic as Boole= anQuery (except using Filter clauses rather than Querys) and already includ= es the logic you suggest if there are only negative clauses.=0A=0ACheers=0A= Mark=0A=0A----- Original Message ----=0AFrom: Chris Hostetter =0ATo: Lucene Dev =0ASent: Friday,= 2 February, 2007 6:26:46 AM=0ASubject: MatchAllDocs in BooleanQuery.rewrit= e=0A=0A=0Amore then once, people have suggested that QueryParser should eit= her throw=0Aand Exception or implicitly put a MatchAllDocsQuery in any Bool= eanQuery it=0Aproduces when the string it's parsing contains entirely negat= ive clauses.=0A=0AI've argued against this idea because QueryParser doesn't= know how the=0AQuery it's producing is oging to be used ... many people (m= yself included)=0Ause it to parse some user input, which they then combine = with other=0Aautomaticaly constructed clauses -- and the MatchAllDocsQuery = would be a=0Abad idea.=0A=0Areplying to question about this tonight, it occ= ured to me that=0ABooleanQuery.rewrite might be a feasible place for code t= hat automaticly=0Aincludes a MatchAllDocsQuery when all clauses are negativ= e ... are there=0Aany legitimate usecases for calling rewrite other then wh= en a Searcher is=0Aabout to execute the query?=0A=0A=0A-Hoss=0A=0A=0A------= ---------------------------------------------------------------=0ATo unsubs= cribe, e-mail: java-dev-unsubscribe@lucene.apache.org=0AFor additional comm= ands, e-mail: java-dev-help@lucene.apache.org=0A=0A=0A=0A=0A=0A=0A=09=09=0A= ___________________________________________________________ =0AInbox full o= f unwanted email? Get leading protection and 1GB storage with All New Yahoo= ! Mail. http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org