<!-- <security-constraint> <web-resource-collection> <web-resource-name>Disable TRACE</web-resource-name> <url-pattern>/</url-pattern> <http-method>TRACE</http-method> </web-resource-collection> <auth-constraint/> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>Enable everything but TRACE</web-resource-name> <url-pattern>/</url-pattern> <http-method-omission>TRACE</http-method-omission> </web-resource-collection> </security-constraint> -->
ext.dic爲擴展字典web
stopword.dic爲中止詞字典apache
IKAnalyzer.cfg.xml爲配置文件tomcat
solr-analyzer-ik-5.1.0.jar ik-analyzer-solr5-5.x.jar爲分詞jar包。app
1)將IK分詞器 JAR 包拷貝到Tomcat8\webapps\solr\WEB-INF\lib下
webapp
2)將詞典 配置文件拷貝到 Tomcat8\webapps\solr\WEB-INF\classes下
編輯器
3)更改在Tomcat8\solr_h\solrhome\solr_core\conf找到managed-schema
配置文件,添加如下:url
<fieldType name="text_ik" class="solr.TextField"> <analyzer type="index"> <tokenizer class="org.apache.lucene.analysis.ik.IKTokenizerFactory" useSmart="true"/> </analyzer> <analyzer type="query"> <tokenizer class="org.apache.lucene.analysis.ik.IKTokenizerFactory" useSmart="true"/> </analyzer> </fieldType>