lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: [jira] Commented: (LUCENE-1424) Add ConstantScorePrefixQuery and ConstantScoreWildcardQuery
Date Wed, 29 Oct 2008 18:25:03 GMT

: I think it would be quite clean if all XXXQuery classes that simply
: enumerate certain terms and then match all docs containing those
: terms, would subclass MultiTermQuery which itself would implement
: set/getRewriteMethod?

FWIW: that may be tricky for the collator logic that was added to 
RangeQuery.

: > > I am torn on this one. Not against the idea, but I think it should be
: > > consistent with ConstantScoreRangeQuery, and it seems a bit awkward to
: > > deprecate that at this point. Not a huge deal either way I guess though.

it wouldn't really be that awkward.  assuming RangeQuery had an option for 
rewriting to a ConstantScoreQuery, ConstantScoreRangeQuery becomes as 
simple as...

   public class ConstantScoreRangeQuery extends RangeQuery {
     public ConstantScoreRangeQuery(...) {
        super(...);
        this.setRewriteConstantScore(true);
     }
   }



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message