SOLR Chinese word breaker Ik-analyzer installation

Source: Internet
Author: User
Tags solr

SOLR itself is not supported in Chinese, so you need to download the Chinese word breaker ik-analyzer https://code.google.com/archive/p/ik-analyzer/downloads. Your local system is centos6.7, so download the https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ Ik-analyzer/ik%20analyzer%202012ff_hf1.zip

Installation steps:

    1. Decompression Ika

Unzip Ik\ Analyzer\ 2012ff_hf1.zip-d IK

2. Copy the Ikanalyzer2012ff_u1.jar to the Solr\web-inf\lib under the SOLR service

CP ikanalyzer2012ff_u1.jar/usr/local/solrtest/tomcat/webapps/solr/web-inf/lib/

3. Copy the IKAnalyzer.cfg.xml and Stopword.dic to the Conf of the core that needs to use the word breaker, and a directory of the core schema.xml files

CP ikanalyzer.cfg.xml/usr/local/solrtest/testdata/collection1/conf/

4. Modify the schema.xml of the core and add the following configuration between the <types></types> configuration items:

<fieldtype name= "Text_ik" class= "SOLR. TextField "><analyzer class=" Org.wltea.analyzer.lucene.IKAnalyzer "/></fieldtype>

5. Modify the schema.xml of the core and add the following configuration between the <fields></fields> configuration items:

<field name= "text" type= "Text_ik" indexed= "true" stored= "true"/>

6. Restart Tomcat to complete the installation

This article is from the "Echo Xiayun" blog, so be sure to keep this source http://linuxerxy.blog.51cto.com/10707334/1774343

SOLR Chinese word breaker Ik-analyzer installation

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.