上传ik配置文件到configsets下对应collection的conf文件夹下
上传修改后的ik-analyzer.jar到solrhome下的lib包
修改schema.xml
<dynamicField name="_sa" type="text_ik" indexed="true" stored="true" />
<dynamicField name="_sa_idx" type="text_ik" indexed="true" stored="false" />
<dynamicField name="*_sa_std" type="text_ik" indexed="false" stored="true" />
<fieldType name="text_ik" class="solr.TextField">
<analyzer type="index">
<tokenizer class="org.wltea.analyzer.util.IKTokenizerFactory" useSmart="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="org.wltea.analyzer.util.IKTokenizerFactory" useSmart="false"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>