![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lucene
amw_demon
这个作者很懒,什么都没留下…
展开
-
Lucene中IndexSearcher类的初始化
Lucene中IndexSearcher的构造函数有以下几个:/** *//** Creates a searcher searching the index in the named directory. */public IndexSearcher(String path) throws IOException ...{ this(IndexReader.open(原创 2007-03-20 19:05:00 · 2635 阅读 · 3 评论 -
类CompoundReader
lucece中CompoundFileReader extends Diretory,从而统一了用.cfs和不用.cfs的读取索引中不同部分文件方法。原创 2007-09-28 16:01:00 · 482 阅读 · 0 评论 -
Lucene搜索中ParserException异常处理
ParserException异常是查询分析器QueryParser的parser函数处理一些lucene中的特殊字符时出现的,这些符号有:+-&|!(){}[]^~*?: /} 还有 AND OR NOT,我的处理方法是把+-&|!(){}[]^~*?: /}过滤掉,把搜索词都转化为小写。原创 2007-11-15 14:19:00 · 694 阅读 · 0 评论 -
lucene中不同的字段应用不同的分词
在lucene的现有的Analyzer的TokenStream tokenStream(String fieldName, Reader reader)方法中的第一个参数String fieldName都没有得用应用.在现有的lucene(<=lucene2.4)建索引过程中,所有的字段都用一种分词,这个参数是没用的.今天突然有这个想法,可以写一个Analyzer,在TokenStream to原创 2008-09-18 10:46:00 · 613 阅读 · 0 评论