
lucene4.2
文章平均质量分 60
Railre
1/4来coding
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
lucene 4.2 简单示例
public class LuceneIntroduction { //查询某个目录下的所有文件,将其内容和路径添加到索引库 public static void indexTxt(IndexWriter writer,File file) throws IOException, ParseException{ if(file.isDirectory()){ File[] fil原创 2013-04-08 15:56:29 · 1380 阅读 · 1 评论 -
lucene4.2 同时搜索多个索引目录
如何创建索引我就不再说了! 同时搜索多个索引目录主要是使用 org.apache.lucene.index.MultiReader 他会将所有的搜索结果进行合并,更多细节可以参考官方文档。 简单代码如下: public void mulitSearch(String str) throws IOException, ParseException{ IndexReader r原创 2013-04-09 09:54:47 · 2656 阅读 · 0 评论