下载IK分词的包:IKAnalyzer2012FF_hf1.zip
然后进行解压
1、/usr/local/services/solr/solr-4/usr/local/services/solr/solr-4.10.3/example/solr/collection1/conf中添加
<!-- IK -->
<fieldType name="text_ik" class="solr.TextField" >
<analyzer type="index" isMaxWorldLength="false" class="org.wltea.analyzer.lucene.IKAnalyzer" />
<analyzer type="query" isMaxWorldLength="true" class="org.wltea.analyzer.lucene.IKAnalyzer" />
</fieldType>
2、新建/usr/local/services/tomcat/tomcat7/webapps/solr/WEB-INF中的classes
拷贝IKAnalyzer.cfg.xml和stopword.dic文件
3、/usr/local/services/tomcat/tomcat7/webapps/solr/WEB-INF/lib文件夹中拷贝
IKAnalyzer2012FF_u1.jar文件
4、重启tomcat