![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 1337 阅读 · 1 评论 -
lucene4.2 同时搜索多个索引目录
如何创建索引我就不再说了! 同时搜索多个索引目录主要是使用 org.apache.lucene.index.MultiReader 他会将所有的搜索结果进行合并,更多细节可以参考官方文档。 简单代码如下: public void mulitSearch(String str) throws IOException, ParseException{ IndexReader r原创 2013-04-09 09:54:47 · 2567 阅读 · 0 评论