[Linux] Linux Install and configure Solr/tomcat/ik Word breaker detailed example two.

Source: Internet
Author: User
Tags solr

In order to better typesetting, so the IK word breaker installation restarted a blog post, you can connect to SOLR installation together to view.
[Linux] Linux installation and configuration Solr/tomcat/ik Word breaker Detailed example one: http://www.cnblogs.com/wang-meng/p/5814798.html


8. Open the browser to view the SOLR visual interface


Here SOLR is configured, but our IK word breaker has not been configured, if not worthy of the IK word breaker, it is how to participle it? Let's take a look first:


Each word is divided into a word, which is certainly not the result we want, and then we begin to configure the IK word breaker.

9, using the IK word breaker
Copy the IK word breaker jar package to /tomcat/webapp/solr/web-inf/lib (here is Solr/web-inf)


Lk.cfg.xml and Stopword.dic copied to tomcat/webapp/web-inf/classes (no classes directory by default, need to be created manually)



10, configure the IK word breaker
Configure Schema.xml files in SOLR home, including configuration data types and custom fields



Edit Schema.xml, because this file has more than 1000 lines, so we switch to notepad++ to open (this software is not familiar with everyone)



Locate the Schema.xml and open the modification:

Modify the following:


Restart Tomcat and continue to the SOLR visual interface to view:


Again to see now participle is not much better? Of course, with the IK word breaker is not enough, often we also need to configure their own extension words and stop words to meet our needs.

11, configure extension words and stop words
First look at the configuration file:

Use Vim to edit IKAnalyzer.cfg.xml:


Add the Ext.dic file, and then add the extension word in the Ext.dic file:




Similarly, adding a stop word can be added directly to the stopwork.dic.
Here the IK word breaker is also configured. Hey, from the beginning or the morning, but re-operation again, these are more proficient.

[Linux] Linux Install and configure Solr/tomcat/ik Word breaker detailed example two.

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.