![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Lucene
lionchen79
这个作者很懒,什么都没留下…
展开
-
Lucene in Action 学习 序章
正在学习Lucene in Action 第二版,可惜的是API太老了,Lucene4.x版本已经不提供了。 为此打算写一系列的学习Lucene in Action心得的博客,并将其中用到的编程例子,改成Lucene4.x版的。 ...原创 2014-01-28 17:03:49 · 54 阅读 · 0 评论 -
Lucene In Action 第二章 2.3.1节 向索引添加Document
一、创建索引存放目录 要添加索引必须先指定索引存放的目录,获取路径的方法有如下方法: 1、Directory dir = FSDirectory.open(new File(indexDir));//在磁盘中创建Directory 2、Directory dir = new RAMDirectory(FSDirectory.open(new File(indexDir)), IOContex...原创 2014-01-28 17:22:01 · 91 阅读 · 0 评论 -
Lucene In Action 第二章 2.4.1 Field options for indexing
不再使用的Field.Index类 该类在Lucene4.x中不再使用。 对应的解决办法: Index.ANALYZED:将field value分成一个个独立的token,每个token都可以被搜索,如:"java lucene"如果使用StandardAnalyzer会被分解成"java"和"lucene"两个token。在Lucene4.x中可以用如下方法替代: 1、直接创建...原创 2014-01-30 01:39:45 · 78 阅读 · 0 评论