[ 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]