Configuring solr4.6.0 servers under Windows

Source: Internet
Author: User
Tags solr

The environment that SOLR needs: JDK, Apache-tomcat, SOLR


I use the configuration: papche-tomcat-7.0.68 and solr4.6.0


1, download solr-4.6.0,

2, extract the solr-4.6.0,

3. Copy the Solr.war file in Solr-4.6.0\example\webapps to the WebApps folder in the Tomcat installation directory

4. Run Tomcat. (Ignoring how Tomcat is run), Tomcat automatically extracts the Solr.war file.

5. Delete the Solr.war file. (otherwise it will be published once every time you start Tomcat)

6. Go back to the WebApps directory of Tomcat and Notepad to open the Solr\web-inf\web.xml file. Add the following code: The last within the <web-app/> node.

< Env-entry >  

< env-entry-name > </ env-entry-name >,

< env-entry-value > </ env-entry-value >,

<env-entry-type>java.lang.String </ Env-entry-type>

</ Env-entry >

As the code above, you need to create a new folder (c/d/e/f) on any disk: Solrhome


7, back to the extracted solr-4.6.0 directory, open folder: SOLR-4.6.0\EXAMPLE\SOLR, copy all the contents to E:\solrhome

8. Open folder: Solr-4.6.0\example\lib\ext, copy all jar packages to Tomcat under Webapps\solr\web-inf\lib.

9, run WEB:HTTP://LOCALHOST:8080/SOLR, will see the interface of SOLR backstage


10. Add mmseg4j-1.9.1 Chinese word breaker

Mmseg4j-1.9.1\dist directory files are copied into the Webapps\solr\web-inf\lib

At the same time, find Schema.xml under \home\collection1\conf, plus the following code:

<fieldtype name= "Text_mmseg4j_complex" class= "SOLR. TextField "positionincrementgap=" >

<analyzer>

<tokenizer class= "Com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode= "complex" dicpath= "dic"/>

</analyzer>

</fieldType>

<fieldtype name= "Text_mmseg4j_maxword" class= "SOLR. TextField "positionincrementgap=" >

<analyzer>

<tokenizer class= "Com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode= "Max-word" dicpath= "dic"/>

</analyzer>

</fieldType>

<fieldtype name= "Text_mmseg4j_simple" class= "SOLR. TextField "positionincrementgap=" >

<analyzer>

<!--

<tokenizer class= "Com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode= "simple" dicpath= "n:/opensource/ Apache-solr-1.3.0/example/solr/my_dic "/>

-

<tokenizer class= "Com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode= "simple" dicpath= "dic"/>

</analyzer>

</fieldType>

<!--mmseg4j-->


11 Enter the HTTP://LOCALHOST:8080/SOLR search interface will be error, this is the right, congratulations you have been configured successfully, the company in accordance with the error message developed a new file replacement original, do not show, the Internet has the following word-breaker bug Solution










Configuring solr4.6.0 servers under Windows

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.