![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Lucence
庸医2048
edgex foundry开发工程师
展开
-
Lucene--002创建搜索
具体步骤:1 创建Directory2 创建IndexReader3 根据IndexReader创建IndexSearcher4 创建搜索的Query5 根据searcher搜索并且返回TopDocs6 根据TopDocs获取ScoreDoce对象7 根据searcher和ScoreDoc对象获取具体的Document对象8 根据Document对象获取需要的值原创 2016-12-17 10:21:50 · 204 阅读 · 0 评论 -
Lucene--003索引创建、域选项
包com.lk;进口则把org.apache.lucene.analysis.standard.StandardAnalyzer;进口org.apache.lucene.document.Document;进口org.apache.lucene.document.Field;进口org.apache.lucene.index.IndexReader;进口org.apache.lucen原创 2016-12-17 21:35:01 · 236 阅读 · 0 评论 -
Lucene修改停用分词器添加新的需要停用的单词
代码:第一步:创建自己的分词器public final class MyStopAnalyzer extends Analyzer { //继承Analyzer这个类 private Set stops; public MyStopAnalyzer(String[] sws) { //构造方法 stops=StopFilter.makeStopSe原创 2016-12-24 18:59:46 · 1160 阅读 · 1 评论