摘要: 1 package com.lucene.score; 2 3 import java.io.IOException; 4 import java.sql.Date; 5 import java.text.SimpleDateFormat; 6 7 import org.apache.lucene.document.Document; 8 import org.apache.lucene.index.CorruptIndexException; 9 import org.apache.lucene.index.IndexReader; 10 import org.apa... 阅读全文
posted @ 2012-04-22 16:09 Paul.Lau 阅读(4883) 评论(1) 推荐(0) 编辑
摘要: 1 /** 2 * 排序查询 3 * 4 * @param querystr 5 * 查找匹配的字符串 6 * @param domain 7 * 查找内容的域 8 * @param filter 9 * 过滤器10 */11 public void SearchByFilter(String querystr, String domain, Filter filter) {12 TopDocs docs... 阅读全文
posted @ 2012-04-22 14:30 Paul.Lau 阅读(7494) 评论(1) 推荐(2) 编辑
摘要: 1 package com.lucene.search; 2 3 import java.io.File; 4 import java.io.FileNotFoundException; 5 import java.io.FileReader; 6 import java.io.IOException; 7 8 import org.apache.lucene.document.Document; 9 import org.apache.lucene.document.Field;10 import org.apache.lucene.document.NumericField;11 i... 阅读全文
posted @ 2012-04-22 13:38 Paul.Lau 阅读(7885) 评论(0) 推荐(0) 编辑
摘要: 1 package com.lucene.util; 2 3 import java.io.Reader; 4 5 import org.apache.lucene.analysis.Analyzer; 6 import org.apache.lucene.analysis.TokenStream; 7 8 import com.chenlb.mmseg4j.Dictionary; 9 import com.chenlb.mmseg4j.MaxWordSeg;10 import com.chenlb.mmseg4j.analysis.MMSegTokenizer;11 12 publi... 阅读全文
posted @ 2012-04-22 11:58 Paul.Lau 阅读(4787) 评论(2) 推荐(1) 编辑
摘要: 1 package com.lucene.util; 2 3 import java.io.Reader; 4 import java.util.Set; 5 6 import org.apache.lucene.analysis.Analyzer; 7 import org.apache.lucene.analysis.LetterTokenizer; 8 import org.apache.lucene.analysis.LowerCaseFilter; 9 import org.apache.lucene.analysis.StopAnalyzer;10 import org.ap... 阅读全文
posted @ 2012-04-22 11:49 Paul.Lau 阅读(3291) 评论(0) 推荐(0) 编辑