Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 26910 invoked from network); 26 Aug 2005 15:56:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Aug 2005 15:56:10 -0000 Received: (qmail 61145 invoked by uid 500); 26 Aug 2005 15:56:04 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 61112 invoked by uid 500); 26 Aug 2005 15:56:04 -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 61099 invoked by uid 99); 26 Aug 2005 15:56:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2005 08:56:04 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.75.234.2] (HELO smtpgate.saa-cons.co.uk) (194.75.234.2) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2005 08:56:21 -0700 Received: (from uucp@localhost) by smtpgate.saa-cons.co.uk (8.8.8/8.8.8) id QAA24038 for ; Fri, 26 Aug 2005 16:58:41 +0100 (BST) (envelope-from Paul.Illingworth@saaconsultants.com) Received: from domino-mail.saa-cons.co.uk(10.10.10.4) by smtpgate.saa-cons.co.uk via smap (V2.1) id xma024034; Fri, 26 Aug 05 16:58:28 +0100 Subject: Does order of BooleanQuery clauses affect search performance? To: java-user@lucene.apache.org X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 Message-ID: From: Paul.Illingworth@saaconsultants.com Date: Fri, 26 Aug 2005 16:58:45 +0100 X-MIMETrack: Serialize by Router on domino-mail/Saa(Release 6.5.1|January 21, 2004) at 26/08/2005 16:58:45 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N A simple question and I guess it may have been asked before. Does the order of Querys in a BooleanQuery affect search speed? By this I mean if the first clause of a BooleanQuery only returns a few results and the second clause returns lots of results and the two are ANDed is this faster than the other way around? Similarly, does searching stop if no results are found and the logical operations would mean no results can be found (similar to Javas "short circuiting" of logical operations)? I ask because I am creating some reasonably complex queries and if I can get a boost by simply organising the logic sensibly then I will. Regards Paul I. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org