How is Lucene’s ConstantScoreRangeQuery better than the old RangeQuery?
In what case should you use still use RangeQuery?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to the RangeQuery documentation in your link,
A ConstantScoreRangeQuery:
Suppose you are interested in scarcer terms being scored higher (say you are looking in a range of hours, but want the scarcer hours to be scored higher – maybe you are looking for a “slow” period of the day to run a backup process). In that case the older RangeQuery seems preferable.
The next generation will be the TrieRangeQuery, currently in the contrib section. It will probably part of the Lucene 2.9 core. It provides faster range queries than both other methods.