您的位置:首页 > 其它

POI创建和读取excel文件

2015-07-01 17:19 197 查看
IndexSearcher is = new IndexSearcher("C:\\luceneIndex");
//对path 进行分词,否则只有输入文章全名才能搜索到
QueryParser qp = new QueryParser("path", new StandardAnalyzer());
Query q = qp.parse("安徽");
Hits hits = is.search(q);
System.out.println(hits.length());
for(int i=0;i<hits.length();i++){
System.out.print(hits.doc(i)+"\t"+hits.score(i));
System.out.println();
}

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: