使用suggestcomponent的SOLR多语言建议

时间:2018-01-29 21:59:11

标签: solr search-suggestion

我正在尝试使用以下配置来获取多语言建议,但它无效。有没有办法使用SOLR建议选项来实现这一目标。

  <searchComponent name="suggest" class="solr.SuggestComponent">
    <lst name="suggester">
      <str name="name">mySuggester</str>
      <str name="lookupImpl">FuzzyLookupFactory</str>      <!-- org.apache.solr.spelling.suggest.fst -->
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>     <!-- org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory -->
      <str name="field">suggest</str>
      <str name="buildOnCommit">true</str>
      <str name="weightField">boost</str>
      <str name="payloadField">concepts</str>
      <str name="suggestAnalyzerFieldType">text_general</str>
    </lst>
    <lst name="suggester">
      <str name="name">engSuggester</str>
      <str name="lookupImpl">FuzzyLookupFactory</str>      <!-- org.apache.solr.spelling.suggest.fst -->
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>     <!-- org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory -->
      <str name="field">suggest</str>
      <str name="buildOnCommit">true</str>
      <str name="weightField">boost</str>
      <str name="payloadField">concepts</str>
      <str name="suggestAnalyzerFieldType">text_en</str>
    </lst>  
    <lst name="suggester">
      <str name="name">espSuggester</str>
      <str name="lookupImpl">FuzzyLookupFactory</str>      <!-- org.apache.solr.spelling.suggest.fst -->
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>     <!-- org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory -->
      <str name="field">suggest</str>
      <str name="buildOnCommit">true</str>
      <str name="weightField">boost</str>
      <str name="payloadField">concepts</str>
      <str name="suggestAnalyzerFieldType">text_es</str>
    </lst>  
  </searchComponent>

Thank you!

0 个答案:

没有答案