簡體   English   中英

加載類“ solr.SmartChineseSentenceTokenizerFactory”時出錯

[英]Error loading class 'solr.SmartChineseSentenceTokenizerFactory'

我正在使用solr 6,並且在下面定義了fieldType。

<fieldType name="text_zh" class="solr.TextField"
                   positionIncrementGap="100">
            <analyzer>
                <tokenizer class="solr.SmartChineseSentenceTokenizerFactory"/>
                <filter class="solr.SmartChineseWordTokenFilterFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
            </analyzer>
        </fieldType>

當我啟動服務器時,我收到錯誤消息:

org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core new_core: Can't load schema /Users/i843100/Downloads/solr-6.1.0/server/solr/new_core/conf/schema.xml: Plugin init failure for [schema.xml] fieldType "text_zh": Plugin init failure for [schema.xml] analyzer/tokenizer: Error loading class 'solr.SmartChineseSentenceTokenizerFactory'

如何解決此錯誤?

HMMChineseTokenizerFactory在solr的更高版本中使用

<fieldType name="text_zh" class="solr.TextField"
            positionIncrementGap="100">
     <analyzer>
         <tokenizer class="solr.HMMChineseTokenizerFactory"/>
         <filter class="solr.StopFilterFactory"
                 words="org/apache/lucene/analysis/cn/smart/stopwords.txt"/>
         <!--filter class="solr.PorterStemFilterFactory"/-->
         <filter class="solr.LowerCaseFilterFactory"/>
     </analyzer>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM