lucene
liliang1222
这个作者很懒,什么都没留下…
展开
-
lucene学习(1)
[b]建立索引的主要用到的类:[/b][list][*]IndexWriter: 建立一个新的index,添加新的documen到一个存在的index,indexwriter能让我们写index,但是不能读和搜索index[*]Directory: 就是指存储index的位置,一般是他的子类来存储index(常用的有FSDirectory和RAMDirectory)[*]Analy...原创 2009-11-02 23:35:40 · 62 阅读 · 0 评论 -
lucene学习(2)
import java.io.IOException;import junit.framework.TestCase;import org.apache.lucene.analysis.WhitespaceAnalyzer;import org.apache.lucene.document.Document;import org.apache.lucene.document...原创 2009-11-03 17:36:49 · 84 阅读 · 0 评论 -
lucene学习(3)
Boosting Documents and FieldssetBoost(float) 设置Documents和Fields在index中的重要性可以给document设置boost,也可以给field设置boost设置boost会删除原来的document然后重新建立索引doc.setBoost();field.setBoost(); boost是怎样存储到in...原创 2009-11-05 23:10:33 · 71 阅读 · 0 评论 -
lucene学习(4)
other directory implementations将某个directory装入到RAMDirectory中Directory ramDir = new RAMDirectory(otherDir)这个被用来加速搜索,将一个已经存在的在硬盘上的索引放入到ram中我们也可以反过来:将RAMDirectory中的索引复制到另一个Directory中Directory....原创 2009-11-10 16:25:37 · 72 阅读 · 0 评论