1

我有这个配置(使用 solr 5.3.1):

<searchComponent class="solr.SuggestComponent" name="suggest">
    <lst name="suggester">
      <str name="name">suggest</str>
      <str name="storeDir">dict_suggest</str>

      <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
      <str name="highlight">false</str>

      <str name="field">suggestion</str>
      <str name="suggestAnalyzerFieldType">suggest</str>

      <str name="dictionaryImpl">DocumentDictionaryFactory</str>
      <str name="payloadField">id</str>

      <str name="buildOnStartup">false</str>
      <str name="buildOnCommit">false</str>
    </lst>
  </searchComponent>

  <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
    <lst name="defaults">
      <str name="echoParams">explicit</str>
      <str name="suggest">true</str>
      <str name="suggest.dictionary">suggest</str>
      <str name="suggest.count">10</str>
    </lst>
    <arr name="components">
      <str>suggest</str>
    </arr>
  </requestHandler>

schema.xml 中的字段定义为<field name="suggestion" type="suggest" indexed="true" stored="true" required="true" multiValued="true" />.

字段类型定义是这样的:

<fieldType name="suggest" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
   </analyzer>
</fieldType>

每次我尝试构建索引时,solr 都会显示Store Lookup build failed 日志中没有转储或描述。

我在配置中遗漏了什么吗?建议者似乎工作正常,因此“内存中”索引工作正常。

谢谢

4

0 回答 0