创建搜索
1 创建directory
2.分词器 analyzer
3indexwriter writer dic an
4.document doc.add
writer.adddocument(doc)
2.查询
indexSearcher searcher =new IndexSearch(dir)
query q =queryparse.parse
hit hits=searcher.searcher(q)
q.close
原文:https://www.cnblogs.com/1880su/p/10190515.html