solr4.0添加mmseg4j和IK Analyzer分词器。下载IK Analyzer 2012FF_hf1.zip和mmseg4j-1.9.0.v20120712-SNAPSHOT.zip,解压。将里面的IKAnalyzer2012FF_u1.jar和mmseg4j-all-1.9.0.v20120712-SNAPSHOT.jar放到solr项目的lib目录下。
在schema.xm中加入
<!-- mmseg4j -->
<fieldType name="text_mmseg4j" class="solr.TextField" >
<analyzer>
<tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="complex" />
</analyzer>
</fieldType>
<!--配置IK分词器-->
<fieldType name="text_ik" class="solr.TextField" autoGeneratePhraseQueries="false" >
<!--索引时候的分词器-->
<analyzer type="index" isMaxWordLength="false" class="org.wltea.analyzer.lucene.IKAnalyzer"/>
<!--查询时候的分词器-->
<analyzer type="query" isMaxWordLength="true" class="org.wltea.analyzer.lucene.IKAnalyzer" />
</fieldType>

2521

被折叠的 条评论
为什么被折叠?



