为什么不能合并Solr索引?

时间:2018-07-12 08:51:39

标签: solr sunspot solrcloud sunspot-rails sunspot-solr

谢谢。

我的Solr(7.3.1)发生此错误。



    null:org.apache.solr.common.SolrException: Error opening new searcher
        at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2095)
        at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2215)
        ...
    Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
        at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:897)
        at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:911)
        ...
    Caused by: java.lang.IllegalStateException: found existing value for PerFieldPostingsFormat.format, field=foo_bar, old=Lucene50, new=Lucene50
        at org.apache.lucene.codecs.perfield.PerFieldPostingsFormat$FieldsWriter.buildFieldsGroupMapping(PerFieldPostingsFormat.java:226)
        at org.apache.lucene.codecs.perfield.PerFieldPostingsFormat$FieldsWriter.merge(PerFieldPostingsFormat.java:152)
        ...

显示的错误消息字段名称为*_ngram*_s

<types>
  <fieldType name="string" class="solr.StrField" omitNorms="true"/>
  <fieldType name="text_ngram" class="solr.TextField" omitNorms="true" autoGeneratePhraseQueries="true">
    <analyzer>
      <charFilter class="solr.MappingCharFilterFactory" mapping="lang/mapping-japanese.txt"/>
      <tokenizer class="solr.NGramTokenizerFactory" maxGramSize="2" minGramSize="2"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="org.apache.lucene.analysis.icu.ICUTransformFilterFactory" id="Katakana-Hiragana"/>
    </analyzer>
  </fieldType>
</types>

<fields>
  <dynamicField name="*_s"     type="string"     stored="false" multiValued="false" indexed="true"/>
  <dynamicField name="*_ngram" type="text_ngram" stored="false" multiValued="false" indexed="true"/>
</fields>

请帮助我。

0 个答案:

没有答案