Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
贴个完整代码:
Analyzer analyzer = new MMSegAnalyzer();
Directory directory = FSDirectory.open(new File("f:/tmp/testindex"));
IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_40, analyzer);
config.setOpenMode(OpenMode.CREATE);
IndexWriter iwriter = new IndexWriter(directory, config);
Document doc = new Document();
doc.add(new TextField("a", "基本地工仍然", Field.Store.YES));
doc.add(new TextField("b", "中国服装", Field.Store.YES));
iwriter.addDocument(doc);
iwriter.commit();
iwriter.close();
并没对 "中国服装" 进行分词。
Original comment by wonderfu...@163.com
on 25 Oct 2012 at 3:25
[deleted comment]
问题同楼上,"基本地工仍然" 和 "中国服装" 都没有进行分词
索引
Original comment by chuchuli...@foxmail.com
on 6 Jan 2013 at 6:25
http://mmseg4j.googlecode.com/files/mmseg4j-1.9.1.v20130120-SNAPSHOT.zip
解决了 lucene 4.0 的分词接口问题。
Original comment by chenlb2...@gmail.com
on 20 Jan 2013 at 4:38
使用 2.0.0
参考 https://github.com/chenlb/mmseg4j-solr
Original comment by chenlb2...@gmail.com
on 19 May 2014 at 11:26
Original issue reported on code.google.com by
wonderfu...@163.com
on 25 Oct 2012 at 3:13