29

Lucene学习笔记之-核心数据结构PriorityQueue的实现原理-每天进步一点点

 5 years ago
source link: http://blog.51cto.com/sbp810050504/2339466
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Luene的核心应用场景是全文检索。简单来说,就是通过用户输入的关键词来匹配相关文档,然后根据匹配程度返回TopN的查询结果给用户。这里需要解决的一个核心问题就是如何快速返回TopN的结果,这本质上是一个排序的问题。说起排序,我们有很多选择,冒泡,快排,归并...。这些排序算法在数据量小的时候,不是问题。一旦数据量过大,就成为问题了。例如对1000万的数组排序:Integer[]a=newInte

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK