欢迎投稿

今日深度:

Solr中文分词,

Solr中文分词,


例如:使用solr自带的中文分词

<fieldType>
    <fieldType name="text_smartcn" class="solr.TextField" positionIncrementGap="0">
      <analyzer type="index">
        <tokenizer class="org.apache.lucene.analysis.cn.smart.HMMChineseTokenizerFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="org.apache.lucene.analysis.cn.smart.HMMChineseTokenizerFactory"/>
      </analyzer>
    </fieldType>
  1. 在需要的字段中使用
    <field name="content" type="text_smartcn" indexed="true" stored="true"/>

转载于:https://www.jianshu.com/p/5d4723db93fe

www.htsjk.Com true http://www.htsjk.com/solr/32089.html NewsArticle Solr中文分词, 例如:使用solr自带的中文分词 fieldType fieldType name="text_smartcn" class="solr.TextField" positionIncrementGap="0" analyzer type="index" tokenizer class="org.apache.lucene.analysis.cn.smart.HMMChineseTokeni...
相关文章
    暂无相关文章
评论暂时关闭