lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark harwood <>
Subject RangeQuery - rewrite to a RangeFilter in a ConstantScoreQuery?
Date Mon, 25 Sep 2006 16:54:49 GMT
Given the trouble people routinely get themselves into using RangeQuery would it make sense
to change the "rewrite" method to generate a ConstantScoreQuery wrapping a RangeFilter?

The only disadvantages I can see would be:

1) Scoring would change - some users may find their apps produce different scores for queries
which they have tuned "match thresholds" for.
2) Highlighting would not work for RangeQueries (not something I would normally see as useful)
3) Explain() would not work the same

This is to be weighed up against the advantages of:

1) Faster queries for most users (see method 1 vs method 4 in
- 4 times faster in that benchmark)
2) No more "too many clauses" exceptions foxing end users
3) Scoring would change - normally for the better. The IDF of terms produced by the range
query is no longer a factor that skews results eg scenarios where the Sundays in a date range
typically rank higher because less documents are posted on that day.

The change wouldn't break the API and therefore require changes to people's client code.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message