Introduction to Lucene 3.6.2 (Solr3.6.2) Overview and integrated Tomcat

Source: Internet
Author: User
Tags command line solr zip tomcat

/**
* "Lucene3.6.2 Introductory series" 13th section _solr3.6.2 Introduction and integrated tomcat
* @see SOLR is a high-performance, JAVA5 developed, open source Enterprise Full-text search engine based on HTTP and Lucene implementation
* @see can be roughly understood as: Lucene focuses on search-bottom implementation and algorithmic optimization, and SOLR focuses on high-level, easy-to-use and managed search servers for Enterprise Services
* @see a little bit more rough to understand: the relationship between Lucene and SOLR is similar to the relationship between Ajax and Jquery,servlet and Struts2,jax-ws and Cxf,nio and Mina
* @see SOLRJ is the interface to SOLR's Java-based access SOLR server, which provides the CRUD (add-check) and optimized interface for indexing the SOLR server
* @see---------------------------------------------------------------------------------------------------------- ----------------
* @see Official website: http://lucene.apache.org/solr/
* @see Download: http://archive.apache.org/dist/lucene/solr/
* @see Document: http://wiki.apache.org/solr/
* @see Http://wiki.apache.org/solr/SolrInstall
* @see HTTP://WIKI.APACHE.ORG/SOLR/SOLRJ
* @see Http://wiki.apache.org/solr/SolrCloud
* @see Http://wiki.apache.org/solr/SolrCloud%20using%20Jboss
* @see Start: Unzip The example folder in Apache-solr-3.6.2.zip to the local hard drive, and then the command line executes [Java-jar Start.jar] starts the SOLR server
* @see and then visit http://127.0.0.1:8983/solr/
* @see---------------------------------------------------------------------------------------------------------- ----------------
* @see and Tomcat integration
* @see 0) If the official download to SOLR to Apache-solr-3.6.2.zip
* @see 1) New Folder D:\Develop\apache-solr-3.6.2\ folder on local hard disk
* @see 2) and create a new D:\Develop\apache-solr-3.6.2\home\ folder
* @see 3) Copy the contents of the downloaded apache-solr-3.6.2.zip\example\solr\ to the new home folder in the previous step
* @see 4) Empty the contents of the D:\Develop\apache-solr-3.6.2\home\data\ folder
* @see 5) and create a new D:\Develop\apache-solr-3.6.2\server\ folder
* @see 6) Copy the Solr.war from the downloaded apache-solr-3.6.2.zip\example\webapps\ to the new server folder in the previous step
* @see then unzip the files in the Solr.war in the current directory, the server folder
* @see 7) Edit the value of the D:\Develop\apache-solr-3.6.2\home\conf\solrconfig.xml 114th behavior below
* @see <datadir>${solr.data.dir:d:\develop\apache-solr-3.6.2\home\data} </dataDir>
* @see In fact this step can also put the data directory into the environment variables, and then use ${environmentvariable} on the reference to the
* @see 8) Edit the 144th line of D:\Develop\apache-tomcat-6.0.36\conf\server.xml (that is, the <Hots> tab) for the following value
* @see <context path= "/SOLR" docbase= "D:\Develop\apache-solr-3.6.2 \server\solr" reloadable= "false"/>
* @see 9) Set the corresponding environment variable for <Context/>, indicating the address of SOLR's home directory, after modification.
* @see <context path= "/SOLR" docbase= "D:\Develop\apache-solr-3.6.2 \server\solr" reloadable= "false" >
* @see <environment name= "Solr/home" type= "java.lang.String" value= "D:\Develop\apache-solr-3.6.2\home" True "/>
* @see </Context>
* @see 10) Start Tomcat and then access http://127.0.0.1:8088/solr/
* @see [Precautions]
* @see for Apache-solr-3.5.0.zip, the following exception may be reported in the end when Tomcat is started
* @see Serious: Org.apache.solr.common.SolrException:Error loading class ' SOLR. Velocityresponsewriter '
* @see caused BY:JAVA.LANG.CLASSNOTFOUNDEXCEPTION:SOLR. Velocityresponsewriter
* @see the 1554th line of the D:\Develop\apache-solr-3.6.2\home\conf\solrconfig.xml file should be modified (line 1573th for solr-3.6.2)
* @see <queryresponsewriter name= "Velocity" class= "SOLR". Velocityresponsewriter "enable=" ${solr.velocity.enable:false} "/>
* @see If you restart Tomcat or report this exception after canceling (that is, set to false) Velocityresponsewriter output format, then simply comment out this line of code.
* @see---------------------------------------------------------------------------------------------------------- ----------------
* @see D:\Develop\apache-solr-3.6.2\home\conf\schema.xml
* @see 1) A large number of domains are defined in this file, and each domain specifies the word breaker defined in each domain in Fieldtype,fieldtype.
* @see 2) We can define the domain directly with SOLR, or we can customize the domain, and the first domain in the large number of fields provided by SOLR is the ID field, and its required is true, that is, the required
* @see We can use its ID field directly, or we can customize the ID field, but only one domain required= "true"
* @see 3) and in the program to use the domain name, must be specified in the Schema.xml, otherwise it will report the following exception
* @see Org.apache.solr.common.SolrException:ERROR: [doc=1] Unknown field ' content '
* @see 4) The 1026th line of the file can be configured with the default search domain <defaultSearchField/>
* @see This refers to the query String in the http://127.0.0.1:8088/solr/admin/interface
* @see---------------------------------------------------------------------------------------------------------- ----------------
*/

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.