`
自治州
  • 浏览: 34940 次
  • 性别: Icon_minigender_1
  • 来自: 奥克兰
社区版块
存档分类
最新评论

lucene index 最简理解(实战中用到后继续更新)

阅读更多

lucene适用于unstructured data 存储, 相对于DBMS, 他能够提供独有匹配指数的搜索结果.

 

从技术上说, lucene index将一系列的document (由filed组成)index成为一个文件. (Index用的是IndexWriter类. 其中, 对于原始文件可以用不同的analyzer parse. ) 然后, 可以快速的search这个indexed文件, 用IndexSearcher类. IndexSearcher需要一个RequestParser的object. RequestParser的作用是parse query string. 它也需要用到analyzer. 注意, RequestParser和IndexWriter的analyzer需一致.

 

References: http://oak.cs.ucla.edu/cs144/projects/lucene/

 

*基于lucene2.0. 目前lucene的版本为4.6

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics