Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 18360 invoked from network); 11 Nov 2008 17:34:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Nov 2008 17:34:37 -0000 Received: (qmail 35127 invoked by uid 500); 11 Nov 2008 17:34:42 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 35089 invoked by uid 500); 11 Nov 2008 17:34:42 -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 35080 invoked by uid 99); 11 Nov 2008 17:34:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 09:34:42 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 17:33:31 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 73217234C28E for ; Tue, 11 Nov 2008 09:33:44 -0800 (PST) Message-ID: <954892602.1226424824470.JavaMail.jira@brutus> Date: Tue, 11 Nov 2008 09:33:44 -0800 (PST) From: "Michael Busch (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1424) Change all multi-term querys so that they extend MultiTermQuery and allow for a constant score mode In-Reply-To: <2115535757.1224422583771.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646606#action_12646606 ] Michael Busch commented on LUCENE-1424: --------------------------------------- Yeah, I understand the reason... and easy "fix" would be in QueryParser#newRangeQuery(): {code:java} protected Query newRangeQuery(String field, String part1, String part2, boolean inclusive) { RangeQuery query; if (constantScoreRewrite) { // TODO: remove in Lucene 3.0 query = new ConstantScoreRangeQuery(field, part1, part2, inclusive, inclusive, rangeCollator); } else { query = new RangeQuery(field, part1, part2, inclusive, inclusive, rangeCollator); } query.setConstantScoreRewrite(constantScoreRewrite); return query; } {code} Since ConstantScoreRangeQuery extends RangeQuery this works and should not change any behavior, right? I tried it out, "ant test-core test-tag" passes with this change. > Change all multi-term querys so that they extend MultiTermQuery and allow for a constant score mode > --------------------------------------------------------------------------------------------------- > > Key: LUCENE-1424 > URL: https://issues.apache.org/jira/browse/LUCENE-1424 > Project: Lucene - Java > Issue Type: New Feature > Reporter: Mark Miller > Assignee: Michael McCandless > Priority: Minor > Fix For: 2.9 > > Attachments: LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch, LUCENE-1424.patch > > > Cleans up a bunch of code duplication, closer to how things should be - design wise, gives us constant score for all the multi term queries, and allows us at least the option of highlighting the constant score queries without much further work. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org