Solr 拼写检查随机工作

Solr spellcheckin randomly working

我对 solr 中集成的拼写检查器有疑问。 我(目前)有两个内核,配置相同 solrconfig.xml(拼写检查器设置正确)和略有不同的 XML(拼写检查器配置相同)。

问题是对于其中一个核心,拼写检查器可以完美运行,而另一个则不能。 对于来自 Solr Admin 的不工作,我可以看到字段 "spelling"(拼写检查使用的字段)已编入索引但未存储。

有什么想法吗?

我认为我无法 post xml 文件,因为它们不属于我。

谢谢大家

编辑:

Solrxml.conf

  <requestHandler name="/select" class="solr.SearchHandler">
  ...
  </requestHandler>

  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
    <lst name="spellchecker">
    <str name="classname">solr.IndexBasedSpellChecker</str>
    <!-- field to use -->
    <str name="field">spelling</str>
    <!-- buildOnCommit|buildOnOptimize -->
    <str name="buildOnCommit">true</str>
    <!-- $solr.solr.home/data/spellchecker-->
    <str name="spellcheckIndexDir">./spellchecker</str>
    <str name="accuracy">0.7</str>
    <float name="thresholdTokenFrequency">.0001</float>
    </lst>
 </searchComponent>

schema.xml(工作中)

 <schema name="docs" version="1.5">
 ...
 <field name="fooCore1"     type="text"             indexed="true"  stored="true"   multiValued="false" />

    <!-- Spellcheck -->
     <field name="spelling"             type="text"             indexed="true"  stored="true"   multiValued="false" />
     <copyField source="fooCore1" dest="spelling" />
    ...

    ...
    <solrQueryParser defaultOperator="OR"/>
 </schema>

schema.xml(不工作)

    <schema name="docs" version="1.5">
    ...
      <field name="fooFoo"              type="text"             indexed="true"  stored="true"   multiValued="false" />
      <copyField    source="fooFoo"     dest="fooCore"  maxChars="300000" />
    <!-- Spellcheck -->
    <field name="fooCore2"              type="text"             indexed="true"  stored="true"   multiValued="false" />
    <copyField source="fooCore2" dest="spelling"    maxChars="300000" />
    ...
    </schema>

第二个模式中除 spelling 之外的所有字段都被存储并使用它们的值编制索引。

甚至尝试创建第三个核心,但都没有用。

似乎 copyField 不能成为另一个 copyField 的来源。

将源从 copyfield 更改为错误模式的 field 并解决了问题。