欢迎投稿

今日深度:

solr安装,

solr安装,


solr分词器安装配置:

<fieldtype name="textComplex" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
        <tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="complex" dicPath="dic"/>
    </analyzer>
</fieldtype>
<fieldtype name="textMaxWord" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
        <tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="max-word" />
    </analyzer>
</fieldtype>
<fieldtype name="textSimple" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
        <tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="simple" dicPath="n:/custom/path/to/my_dic" />
    </analyzer>
</fieldtype>

在schema.xml配置文件中,field属性是配置你的什么属性是要参与分词的


solr安装:

(1)下载solr,不用教

(2)解压后将dist中的solr.war文件webapp目录下让tomcat解压,与此同时,配置tomcat的server.xml

<Context path="solr" docBase="solr" reloadable="true" debug="0" crossContext="true">
			 <Environment name="solr/home" type="java.lang.String" value="<span >E:\server1\webapps\solr\home</span>" override="true"/> 
</Context>
(3)将解压后的example中的slor复制出来,这个是关于solr工作的目录,比如分词,上面的value就对应着这个目录,目录中有conf,collection1,等目录



www.htsjk.Com true http://www.htsjk.com/solr/32885.html NewsArticle solr安装, solr分词器安装配置: fieldtype name="textComplex" class="solr.TextField" positionIncrementGap="100" analyzer tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="complex" dicPath="dic"/ /analyzer/field...
相关文章
    暂无相关文章
评论暂时关闭