创建搜索
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
创建搜索
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