NGramFilterFactory在Solr 6.6.0中不起作用

时间:2017-07-17 13:36:55

标签: apache solr lucene

我已从版本6.4.1升级到6.6.0,并且在NGramFilterFactory下面的构造中不再有效:

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
    <analyzer type="index">
        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
        <filter class="solr.ShingleFilterFactory" minShingleSize="2" maxShingleSize="3" outputUnigrams="true" outputUnigramsIfNoShingles="false" tokenSeparator=""/>
        <filter class="solr.NGramFilterFactory" maxGramSize="15" minGramSize="2"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="1" splitOnNumerics="0" />
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
...
</fieldType>

抛出以下异常:

  

core_name:org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:无法加载核心core_name的conf:无法加载架构/path/to/solr-6.6.0/server / solr / core_name / conf / managed-schema:[schema.xml] fieldType“text”的插件初始化失败:[schema.xml] analyzer / filter的插件初始化失败:class org.apache.lucene.analysis.ngram.NGramTokenizerFactory

如果我注释掉NGramFilterFactory过滤器,一切正常,而不会产生错误。

我查看了文档,NGramFilterFactoryNGramTokenizerFactory都未标记为已弃用。

甚至不知道该怎么想。

0 个答案:

没有答案