solr5.5.4 Incremental index automatically synchronizes MySQL data

Source: Internet
Author: User
Tags solr

Foreword: Prior to testing the SOLR several versions were unsuccessful, SOLR is better to download version 5.0,5.5,6.6. solr6.6 combined with TOMCAT8 to do automatic synchronization MySQL data has been error, and then decisively test 5.5 version of the success.

Environment: WINDOWS10, jdk1.8,tomcat8,solr5.5.4

Implementation of the function: through the front-end input keyword query, and query multi-table multi-field. When database MySQL adds or updates data, the data is automatically updated to the SOLR engine.

Body:

First step: Download SOLR

1.solr5.5 Download: http://apache.fayea.com/lucene/solr/, select the solr5.5.5 version of the download, I have installed, the directory is as follows

Unzip the two newly downloaded two new compressed files. Solrhome was the one I added later.

Part II: Copy the files in SOLR to Tomcat

1.e:\solr\test\solr-5.5.4\server\solr-webapp\webapp, copy the WebApp folder to Tomcat under WebApps and rename WebApp to me solr.

2. Add classes below the secondary directory E:\solr\test\apache-tomcat-8.5.20\webapps\solr\WEB-INF. Then copy all of the jar packages below the E:\solr\test\solr-5.5.4\server\lib\ext secondary directory to E:\solr\test\apache-tomcat-8.5.20\webapps\solr\ Under Lib Web-inf, copy the log4j.properties to E:\solr\test\ under the E:\solr\test\solr-5.5.4\server\resources directory at the same time Under Apache-tomcat-8.5.20\webapps\solr\web-inf\classes file

Step three: Copy the file E:\solr\test\solr-5.5.4\server\solr, put it under E:\solr\test and Tomcat on the same layer, rename the bit solrhome

Fourth step: Set the path of the SOLRHOMG: Modify the Web. xml file under Directory E:\solr\test\apache-tomcat-8.5.20\webapps\solr\WEB-INF, before this code is commented.

Excerpt from others: http://blog.csdn.net/moxuelang/article/details/51417925

Note: here. /.. Why does/solr/make this value, and why is it so configured, this is because SOLR's default Env-entry-value start location is under Tomcat's Bin folder, so: /.. /solr/This means that, under the Bin folder of the previous directory, and then the next level of the SOLR folder under the directory, that is, Solr_server under the Solr folder, is the location of Solr Solrhome, I don't think it's good that everyone else on the web put the Solrhome (SOLR) folder directly in the Tomcat bin directory. Another benefit of this configuration here is that when we deploy the application, as long as we copy the Solr_server to the target server, we start Tomcat, we do not need to modify any configuration, as a general configuration, to specify the specific drive letter, from development to deployment server, You need to change the location of the solrhome.

Fifth step: Add the core, which is your data index to the similar out-of-the-Library stuff in SOLR

Under Solrhome, add a folder Core1, copy the folder E:\solr\test\solr-5.5.4\server\solr\configsets\basic_configs\conf, and put it in the core1 you just added, Then launch Tomcat, Access http://localhost:8080/solr/admin.html#

Click on Core Admin and click Add Core:

solr5.5.4 Incremental index automatically synchronizes MySQL data

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.