First will download the extracted solr-4.9.0 directory inside to find the Lucene-analyzers-smartcn-4.9.0.jar file,
Copy it into SOLR's application D:\apache-tomcat-7.0.54\webapps\solr\WEB-INF\lib,
Note: Many articles on the web use the IK Chinese word breaker (Ik_analyzer2012_u6.jar) but in the solr-4.9.0 version, I have not been configured successfully. So you can only use the Chinese word breaker that comes with SOLR.
In the application directory back to SOLR (D:\Demos\Solr\collection1\conf)
Modify the Schema.xml so that SOLR can support Chinese participle.
1 <FieldTypename= "Text_smart"class= "SOLR." TextField "Positionincrementgap= "+">2 <Analyzertype= "Index">3 <!--Here you need to configure the main parts of speech -4 <Tokenizerclass= "SOLR." Smartchinesesentencetokenizerfactory "/>5 <!--6 <filter class= "SOLR. Stopfilterfactory "ignorecase=" true "words=" Stopwords.txt "enablepositionincrements=" true "/>7 <filter class= "SOLR. Lowercasefilterfactory "/>8 -9 <!--In this example, we'll only use synonyms at query timeTen <filter class= "SOLR. Synonymfilterfactory "synonyms=" Index_synonyms.txt "ignorecase=" true "expand=" false "/> One - A <Filterclass= "SOLR." Smartchinesewordtokenfilterfactory "/> - </Analyzer> - <Analyzertype= "Query"> the <!--Configure here Ibid . - - <Tokenizerclass= "SOLR." Smartchinesesentencetokenizerfactory "/> - <!-- - <filter class= "SOLR. Stopfilterfactory "ignorecase=" true "words=" Stopwords.txt "enablepositionincrements=" true "/> + <filter class= "SOLR. Synonymfilterfactory "synonyms=" Synonyms.txt "ignorecase=" true "expand=" true "/> - <filter class= "SOLR. Lowercasefilterfactory "/> + - A <Filterclass= "SOLR." Smartchinesewordtokenfilterfactory "/> at </Analyzer> - </FieldType>
Schema.xml
After saving, restart the Tomcat server and enter the URL in the Address bar: http://localhost:8080/solr/Access SOLR
See above this interface to explain the configuration Chinese word success ... Again, the Java configuration is really troublesome! I hope this illustrated tutorial online can really a little more, have a few genius to solve the Chinese word segmentation configuration. Unfortunately, the use of IK Chinese word words on the Internet is still not in the solr-4.9.0.