Building of SOLR and SOLR clusters in Linux

Source: Internet
Author: User
Tags solr

1 Import the SOLR jar package into Linux and unzip TAR-ZXVF solr-4.10.3.tgz.tgz

2 Go to file CD Solr-4.10.3/bin run SOLR./SOLR start-p 8080 ps-ef|grep solr view SOLR for presence

3 Test If you can run a local LINUXIP:8080/SOLR

4 If you can run off SOLR./SOLR stop-p 8080 You need to configure the configuration file according to requirements to place the word breaker Ikanalyzer2012ff_u1.jar into the example/solr-webapp/webapp/of the SOLR folder Web-inf/lib

Create a Classes folder under Web-inf

Place the configuration file of the word breaker mydict.dic ext_stopword.dic IKAnalyzer.cfg.xml into the example/solr-webapp/webapp/web-inf/classes under the Solr folder

5

Modify the Schema.xml file under Solr to add FieldType:

Vim/usr/local/solr-4.10.3/exammple/solr/collection1/conf/schema.xml

Add the following files to this configuration file

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

<field name= "Item_title" type= "Text_ik" indexed= "true" stored= "true"/>
<field name= "Item_sell_point" type= "Text_ik" indexed= "true" stored= "true"/>
<field name= "Item_price" type= "Long" indexed= "true" stored= "true"/>
<field name= "Item_image" type= "string" indexed= "false" stored= "true"/>
<field name= "Item_category_name" type= "string" indexed= "true" stored= "true"/>
<field name= "Item_desc" type= "Text_ik" indexed= "true" stored= "false"/>

<field name= "Item_keywords" type= "Text_ik" indexed= "true" stored= "false" multivalued= "true"/>
<copyfield source= "Item_title" dest= "Item_keywords"/>
<copyfield source= "Item_sell_point" dest= "Item_keywords"/>
<copyfield source= "Item_category_name" dest= "Item_keywords"/>
<copyfield source= "Item_desc" dest= "Item_keywords"/>

Save exit

5 go to the bin directory under SOLR run SOLR./SOLR start-p 8080

6 Test If you can run a local LINUXIP:8080/SOLR

Solrcloud SOLR Cluster
Create a folder under/usr/local Solrcloud
Will configure the full solr-4.10.3 copy three copies into Solrcloud named Solr01 Solr02 solr03
Executed under three files, respectively
./SOLR01/BIN/SOLR start-c-Z Zookeeper IP address: 2181-p custom Port
Whether the test can be connected
Local LINUXIP:8080/SOLR Click Greph in the list on the left of the page to see if it was successful

Building of SOLR and SOLR clusters in Linux

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.