lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: [jira] Commented: (LUCENE-1424) Add ConstantScorePrefixQuery and ConstantScoreWildcardQuery
Date Tue, 28 Oct 2008 22:25:20 GMT
> Michael McCandless (JIRA) wrote:
> > I do like the idea of adding "constant score capability" to the
> > existing query classes, instead of adding new ConstantScoreXXXQuery
> > classes.
> >
> 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.

In my opinion, RangeQuery should also have this boolean flag for
consistency. Deprecating ConstantScoreRangeQuery is not so nice, but needed.
A workaround would be:

... RangeQuery ... {
	public Query rewrite(IndexReader r) {
		if (constantScore)
			return new ConstantScoreRangeQuery(...).rewrite(r);
		else...
	}
}


---------------------------------------------------------------------
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