Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 65140 invoked from network); 6 Aug 2008 21:52:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Aug 2008 21:52:16 -0000 Received: (qmail 16773 invoked by uid 500); 6 Aug 2008 21:52:09 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 16322 invoked by uid 500); 6 Aug 2008 21:52:08 -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 16311 invoked by uid 99); 6 Aug 2008 21:52:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 14:52:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.69.42.181] (HELO radix.cryptio.net) (208.69.42.181) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 21:51:13 +0000 Received: by radix.cryptio.net (Postfix, from userid 1007) id 2973D71C415; Wed, 6 Aug 2008 14:51:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by radix.cryptio.net (Postfix) with ESMTP id 26C1C71C408 for ; Wed, 6 Aug 2008 14:51:41 -0700 (PDT) Date: Wed, 6 Aug 2008 14:51:41 -0700 (PDT) From: Chris Hostetter To: java-user@lucene.apache.org Subject: Re: Strict Ordering of Boosted results? In-Reply-To: <1217104665.28219.10.camel@nuraku> Message-ID: References: <1217104665.28219.10.camel@nuraku> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : word: termA^10.0 word: termB^2.0 : : I want ALL termA results (ordered by score) to come before ANY termB : results (also ordered by score). Is there a way to do this in the query : syntax? Or is this simple multiple queries? the syntax lets you specify the query boost on each clause, but those boost are just one factor in determining score -- the TF, IDF, and index time boosts (include length norm) also come into play -- you can eliminate them by customizing your Similaity class. that will get you *close* to what you want, but you still have to worry about hte possibility that doc will match termB, termC, etc.. but not termA ... the scores from all of those other terms added up might be higher then the score from a doc that matches termA -- but there is a solution tothis too: instead of a BooleanQuery you can use a DisjunctionMaxQuery with the tiebreaker value set to 0, which means that even if multiple clauses match only the one with the highest score will contribute to the document score -- since you've eliminated TF, IDF, and index time boosts, that will mean only your query boosts will matter. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org