Solr 7.2 installation instance and Chinese Word Divider

Source: Internet
Author: User
Tags solr

Solr 7.2 installation instance and Chinese Word Divider
Solr 7.2 installation instance and Chinese Word divider I. Installation instance 1. Create instance directory

[Root @ node004] # mkdir-p/usr/local/solr/home/jonychen

2. Copy instance configuration files

[Root @ node004] # cp/usr/local/solr/home/configsets/_ default/conf-rf/usr/local/solr/home/jonychen

3. Modify solrConfig. xml

[Root @ node004] # cp/root/solr-7.2.0/contrib-rf/usr/local/solr/home/
[Root @ node004] # cp/root/solr-7.2.0/dist-rf/usr/local/solr/home/

[Root @ node004] # vi/usr/local/solr/home/jonychen/conf/solrconfig. xml

4. Create an ECS instance on the console

Instance created


2. Install the Chinese word divider. 1. Copy the jar package.

[Root @ node004 ~] # Cd/usr/local/solr/home/contrib/analysis-extras/lucene-libs/

[Root @ node004 lucene-libs] # cp lucene-analyzers-smartcn-7.2.0.jar/usr/local/solr/apache-tomcat-8.5.24/webapps/solr/WEB-INF/lib/

2. Modify managed-schema

[Root @ node004 ~] # Cd/usr/local/solr/home/jonychen/conf

[Root @ node004 conf] # vi managed-schema

Chinese Word Divider

<!-- ChineseAnalyzer --><fieldType name="solr_cnAnalyzer" class="solr.TextField" positionIncrementGap="100">  <analyzer type="index">    <tokenizer class=""/>  </analyzer>  <analyzer type="query">    <tokenizer class=""/>  </analyzer></fieldType>

Change the default tokenizer to a Chinese tokenizer.

3. Restart tomcat

[Root @ node004] #/usr/local/solr/apache-tomcat-8.5.24

[Root @ node004 apache-tomcat-8.5.24] #./bin/shutdown. sh

[Root @ node004 apache-tomcat-8.5.24] # jps
Jps 2670
[Root @ node004 apache-tomcat-8.5.24] # ps-ef | grep java
Root 2681 1988 0 00:00:00 pts/0 grep java
[Root @ node004 apache-tomcat-8.5.24] #./bin/startup. sh
Using CATALINA_BASE:/usr/local/solr/apache-tomcat-8.5.24
Using CATALINA_HOME:/usr/local/solr/apache-tomcat-8.5.24
Using CATALINA_TMPDIR:/usr/local/solr/apache-tomcat-8.5.24/temp
Using JRE_HOME:/usr/local/java/jdk1.8.0 _ 111
Using CLASSPATH:/usr/local/solr/apache-tomcat-8.5.24/bin/bootstrap. jar:/usr/local/solr/apache-tomcat-8.5.24/bin/tomcat-juli.jar
Tomcat started.
[Root @ node004 apache-tomcat-8.5.24] # tailf./logs/catalina. out

4. Test

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: 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.