solr6.0 Configuring the Chinese word breaker ik Analyzer

Source: Internet
Author: User
Tags solr mysql database

The configuration of the Chinese word breaker IK Analyzer in solr6.0 and the biggest difference in SOLR's lower version is the reference to the jar package in IK Analyzer. The generic IK participle jar package is not available because the traditional jar in IK participle does not support solr6.0 this high version, so it sends an interface to run the error. Here's a look at the configuration of the Chinese word breaker IK Analyzer in solr6.0.

Step 1:

Download the solr6.0 dedicated IK Analyzer jar package and the corresponding configuration file.  Because IK Analyzer can be very convenient to expand the word library in recent years, so I added the Sogou thesaurus in the IK Analyzer configuration, can maximize the current words. IK Analyzer's jar package and corresponding profile download address: Click on the link to open it

Step 2:

Unzip the compressed package from the previous step and place the Ik-analyzer-solr5-5.x.jar jar package into the Web-inf\lib directory under the SOLR project. The ikanalyzer.cfg.xml,mydict.dic (Sogou extension thesaurus), Stopword.dic, is placed in the Web-inf\classes directory under the SOLR project.

Step 3:

Add the following configuration information to the Managed-schema configuration file under solrhome\mynode\conf under Project </schema>: (If you don't understand, you can go to my previous blog about the configuration of the environment of the solr6.0 project Connection address: Click to open the link)

<span style= "FONT-SIZE:14PX;" >	<fieldtype name= "Text_ik" class= "SOLR. TextField ">
		<analyzer class=" Org.wltea.analyzer.lucene.IKAnalyzer "/>
	</fieldType>
	<field name= "Text_ik"  type= "Text_ik" indexed= "true"  stored= "true"  multivalued= "false"/></ Span>

Step 4:

Launch Tomcat and open the SOLR Project home page to test. The test results are as follows:



In conjunction with the previous MySQL database configuration, here I integrated the Solr6.0+mysql5.0+ik Analyzer participle. If interested can download down to see, download address: Click to open the link

If you have any questions or doubts about the article, you can add my subscription number on the above message, subscription number above I will regularly update the latest blog. If it's too much trouble, just add me to Wechat:lzqcode .



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.