初始化QueryElevationComponent时出错。为查询定义两次Boosting查询

时间:2017-10-13 09:46:16

标签: solr lucene

我已经实现了自己的自定义Solr过滤器,如果我尝试将此过滤器添加到索引和查询分析器,我会收到此错误:

Error CREATEing SolrCore 'itemsCore': Unable to create core [itemsCore] Caused by: Boosting query defined twice for query: 'aciclovir' (.

仅将过滤器添加到索引分析器中。

它只是一个自定义分解过滤器,我覆盖了分解方法。

更新

Elevation组件具有此标记

<query text="aciclovir">
    <doc id="905093" />
  </query>

我的solr配置电梯部分。

<searchComponent name="elevator" class="solr.QueryElevationComponent" >
  <!-- pick a fieldType to analyze queries -->
    <str name="queryFieldType">keyword_text</str>
    <str name="config-file">elevate_${solr.core.name}.xml</str>
  </searchComponent>

此提交的架构配置:

<fieldType name="keyword_text" class="solr.TextField"
    positionIncrementGap="1000" omitNorms="true" 
    omitTermFreqAndPositions="true">
        <analyzer type="index">
            <tokenizer class="solr.PatternTokenizerFactory" pattern="\|" />
            <filter class="solr.LowerCaseFilterFactory" />
            <filter
                class="solr.custom.filter.CustomDecompositionFilterFactory"
                dictionary="lang/germanwords.txt" />
            <filter class="solr.StopFilterFactory" ignoreCase="true"
                words="lang/stopwords_de.txt" format="snowball" />
            <filter class="solr.LengthFilterFactory" min="1" max="100" />
            <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
            <filter class="solr.ShingleFilterFactory" maxShingleSize="4" />
        </analyzer>

        <analyzer type="query">
            <tokenizer class="solr.PatternTokenizerFactory" pattern="\$" />
            <filter class="solr.LowerCaseFilterFactory" />
            <filter class="solr.StopFilterFactory" ignoreCase="true"
                words="lang/stopwords_de.txt" format="snowball" />

            <filter
                class="solr.custom.filter.CustomDecompositionFilterFactory"
                dictionary="lang/germanwords.txt" />

            <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
            <filter class="solr.ShingleFilterFactory" maxShingleSize="4" />
        </analyzer>
    </fieldType>

0 个答案:

没有答案