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

猜你喜欢

转载自puretech.iteye.com/blog/2007017