SOLR 4 Examples of deployment tutorials

Source: Internet
Author: User
Tags solr

SOLR 4 Examples of deployment tutorials

SOLR 4.0 Introductory Basic tutorial, first say a bit after deployment will certainly be someone with SOLRJ,SOLR 4.0 seems to add a lot of things, which commonshttpsolrserver this class renamed Httpsolrserver, I was looking for a long while to find that Everyone can pay attention later.

Prepare before deployment:

    • SOLR must be running in Java1.5 or later Java virtual machines, and running the standard SOLR service requires only installing the JRE.
    • SOLR 4.0:http://www.apache.org/dyn/closer.cgi/lucene/solr/4.0.0
    • This article is a demonstration of Tomcat7.0.

SOLR 4.0 directory:

Here is how I deploy, Tomcat installs the Solr.war file under Apache-solr-4.0.0\example\webapps to the Tomcat7.0\webapps directory under Tomcat, and then launches Tomcat Error no tube, Solr.war will automatically unzip, then open Tomcat7.0\webapps\solr\web-inf\web.xml, copy the following code to put in the back:

<Env-entry>  <Env-entry-name>Solr/home</Env-entry-name>  <Env-entry-value>E:\SolrHome</Env-entry-value>  <Env-entry-type>Java.lang.String</Env-entry-type></Env-entry>

Where E:\SolrHome is to store SOLR configuration files and so on, modify the location of their files, in order to see more clearly and intuitively, you can put:

E:\Tomcat7.0

E:\apache-solr-4.0.0

E:\SolrHome

Now you can restart Tomcat, no error, enter the Solr4.0 page via this address: HTTP://LOCALHOST:8080/SOLR

If the above interface is successful, there will be an error message on the page without success.

The left Core0,core1 is the example in SOLR 4.0, where Core0 and Core1 are located under Apache-solr-4.0.0\example\multicore All files are copied under E:\SoleHome, Core0 and Core1 can be understood as two libraries, are independent, used to store the index and generate these index files required by the configuration file, Solrtest is my test set up the directory,

Not adding a library needs to be configured in Solr.xml, which is relatively simple

<SOLRPersistent= "false">  <coresAdminPath= "/admin/cores"Host= "${host:}"Hostport= "${jetty.port:}">    <Corename= "Core0"Instancedir= "Core0" />    <Corename= "Core1"Instancedir= "Core1" />    <Corename= "Collection1"Instancedir= "Collection1" />    <Corename= "Solrtest"Instancedir= "Solrtest"/>  </cores></SOLR>

Name= "", is the name of the library, instancedir= "", is the directory

SOLR 4 Examples of deployment tutorials

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.