Tomcat8.0 Build solr7.4

Source: Internet
Author: User
Tags apache solr solr

What is SOLR
?
Apache SOLR is built on Lucene (full-text search engine) to help us find the information we need from a large amount of data. It can be used for searching and storage purposes. Like other NoSQL databases, it is a non-relational data storage and processing technology.
?
the installation and configuration of SOLR
?

  • Environmental requirements: tomcat8.0+solr7.4 (version please agree with me)
    ?
  • Solr7.4 Download: http://archive.apache.org/dist/lucene/solr/(Note select. zip format,. tgz is used on Linux systems)
    ?
    • Step1: Copy the webapp folder under solr-7.4.0/server/solr-webapp/ to webapps under Tomcat Directory (and rename to SOLR)
      ?
    • Step2: Copy all the jar files under solr-7.4.0/server/lib/ext/ to the webapps/solr/web-inf/lib directory under Tomcat .
      ?
    • Step3: Copy all jar files starting with Solr-7.4.0/server/lib under all metrics to the webapps/solr/web-inf/lib directory.
      ?
    • Step4: Modify the 41st line of the tomcat/webapps/solr/web-inf/web.xml file to specify the directory where the solrhome is located

      ?
    • STEP5: Modify the 164th line of the tomcat/webapps/solr/web-inf/web.xml file

      ?
    • STEP6: Modify the catalina.batunder tomcat\bin , increase the solr.log.dir system variable, and specify the SOLR log record storage address.
      if not "%JSSE_OPTS%" == "" goto gotJsseOptsset JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048":gotJsseOptsset "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"set "JAVA_OPTS=%JAVA_OPTS% -Dsolr.log.dir=C:\study\solrhome\logs"--增加的一行


      ?

    • STEP7: With SOLR logging store address, create a new logs folder under Solr-home

      ?
    • STEP8: Copy solr-7.4.0 under contrib and Dist folder to solr-home directory.
      ?
    • STEP9: Create a new New_core folder in the solr-home directory, and copy
      solr-7.4.0\server\solr\configsets_default\ directory under conf folder to Solr-home\new_core .

?

    • STEP10: Modify the solr-home\newcore\conf\solrconfig.xml file

      ?
    • STEP11: Configure an IK word breaker to import the ik-analyzer-solr5-5.x and solr-analyzer-ik-5.1.0 two jar packages tomcat\webapps\solr\ Web-inf\lib ,: https://pan.baidu.com/s/1shNBxP4sNzfJ0UAhRJ6dNg
      ?
    • STEP12: Configure the managed-schema file to join under solr_home\new_core\conf
      <fieldType name="text_ik" class="solr.TextField" positionIncrementGap="100">    <analyzer type="index">  --此处为创建索引分词   <tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory"  useSmart="false"/>     <filter class="solr.LowerCaseFilterFactory"/>    </analyzer>    <analyzer type="query"> -- 此处为查询分词索引 <tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory"  useSmart="true"/>          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>     <filter class="solr.LowerCaseFilterFactory"/>    </analyzer>    </fieldType>

      ?

    • STEP13: Launch Tomcat, Access http://localhost:8080/solr/index.html
      ?

?
Encounter the Pit
?
The SOLR backend is normally accessed with Tomcat's Startup.bat boot, but after booting Tomcat in Eclipse, access to SOLR is 404
?
Cause of a pit
?
found that the home page of Tomcat access Tomcat launched in Eclipse was not accessible, and Baidu discovered that Eclipse had redirected the Tomcat Project publishing directory (WebApp in the Tomcat directory). You will find that your project file cannot be found in the WebApp directory under the Tomcat installation directory.
?
Pits
?
Reconfigure the following Tomcat server: On the server Page in Eclipse, first remove the project deployed in Tomcat, then double-click the Tomcat service and select the use Tomcat installation (Task control of Tomcat installation) selects the Tomcat installation directory as the publishing directory for the project.

Tomcat8.0 Build solr7.4

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.