A collection of problems in the construction of hadoop,hbase cluster environment (III.)

Source: Internet
Author: User
Tags solr

16 Configure the IK Chinese word breaker.
1. Download the latest IK chinese word breaker.
: Http://ik-analyzer.googlecode.com/files/IK%20Analyzer%202012FF_hf1.zip
2. Extract the IK Analyzer 2012ff_hf1.zip and get the IK Analyzer 2012ff_hf1. Place the ikanalyzer.cfg.xml,stopword.dic under the directory before installing the Tomcat_home/webapps/solr/web-inf/classes directory (classes folder is not created. ) Ikanalyzer2012ff_u1.jar in the Tomcat_home/webapps/solr/web-inf/lib directory that was previously installed
3. Modify the Schema.xml in/solr_home/collection1/conf/and add the following in the type:

<fieldType name="text_ik"class="solr.TextField">        type="index" isMaxWordLength="false"class="org.wltea.analyzer.lucene.IKAnalyzer"/>        type="query" isMaxWordLength="true"class="org.wltea.analyzer.lucene.IKAnalyzer"/></fieldType>

Modify filed at the same time to make filed reference Text_ik. This will enable you to use the IK word breaker.
<field name="name" type="text_ik" indexed="true" stored="true"/>

17.schema.xml

Try the workaround: Add in fields in Schema.xml
<field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
Results

Add in Type
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>

./shutdown.sh stop Tomcat, and then./startup.sh start Tomcat. The results are not correct. I do not know whether it will affect the development of the later stage.

18.

Disappear with the resolution of problem 17.
19.SOLR configuration multicore?
For:
Reference: http://aixiangct.blog.163.com/blog/static/9152246120111128114423633/
multicore configuration for Solr4.6: http://my.oschina.net/DavidTio/blog/185521
Http://www.devnote.cn/article/37.html

  1. SOLR Basics – Three ways to set up solr/home?
    A: This is the first blog post in open source China, I hope to encounter problems, search and hide the notes to share with you, of course, today's content is not my original, just as a start. Strive for a lot of originality later.
    Solr/home is the basis and portal for SOLR to instantiate core cores and is an essential configuration.
    There are three ways to complete its configuration in Tomcat.
    1. Set in Web. xml
    <env-entry>
    <env-entry-name>solr/home</env-entry-name>
    <env-entry-value>C:/example2/solr(path_to_solr_home_solr)</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>

    This method is not convenient for deployment, it needs to be packaged before the deployment environment is modified.
    2. Setting variables by using Tomcat's Jndi method
    Under the root directory where you installed Tomcat, locate or create a new path: Conf\catalina\localhost;
    Create a new XML file based on the project name you deployed, called Solr.xml if the package is called SOLR.
    The contents are:
    <Context docBase="E:/apache-tomcat6_1/webapps/solr(the_path_to solr.war)" debug="0" crossContext="true" >
    <Environment name="solr/home" type="java.lang.String" value="C:/example2/solr(the_path_to_solr_home)" override="true" />
    </Context>

    3, Tomcat boot java_opts parameter setting mode
    Under the root directory where you installed Tomcat, find Bin\catalina.bat added in the java_opts option,
    Like Windows, you can add a row of set JAVA_OPTS-DSOLR.SOLR.HOME=C:/EXAMPLE2/SOLR to the front
    Resources:
    Http://www.myexception.cn/open-source/745464.html

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

A collection of problems in the construction of hadoop,hbase cluster environment (III.)

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.