Lucene 中的 ConstantScoreRangeQuery
Lucene 的 ConstantScoreRangeQuery 比旧的 RangeQuery?
什么情况下应该使用RangeQuery?
How is Lucene's ConstantScoreRangeQuery better than the old RangeQuery?
In what case should you use still use RangeQuery?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您链接中的 RangeQuery 文档,
ConstantScoreRangeQuery:
假设您对稀有术语的得分较高感兴趣(假设您正在寻找一系列时间,但希望稀有时间的得分较高 - 也许您正在寻找一天中的“慢速”时段来运行备份过程) 。 在这种情况下,较旧的 RangeQuery 似乎更可取。
下一代将是 TrieRangeQuery,目前位于 contrib 部分。 它可能是 Lucene 2.9 核心的一部分。 它提供比其他两种方法更快的范围查询。
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.