摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文