0

I am trying to use the following config to get multilanguage suggestions but it's not working. Is there a way to use SOLR suggester option to accomplish that.

  <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!
  • Exactly what are you trying to achieve? Multiple suggesters - one for each language, or all suggestions in a single suggester regardless of what field the content was indexed into? – MatsLindh Jan 30 '18 at 13:51
  • Multiple suggesters - one for each language. – msuman49 Jan 30 '18 at 15:05
  • Are you actually including the suggester name in the `suggest.dictionary` parameter? What do you get back? – MatsLindh Jan 30 '18 at 19:05
  • suggest?wt=json&suggest.count=11&q=través&json.wrf=jQuery321034108682813642477_1516305063235&_=1516305063238&suggest.dictionary=espSuggester – msuman49 Jan 31 '18 at 18:35
  • Are the field you're building from set as stored? The DocumentDictionaryFactory requires it to be set as stored - and have you tried setting build on startup to see if that helps? (i.e. maybe the build hasn't been triggered by a commit?) And what is the result from your request? – MatsLindh Feb 01 '18 at 10:31

0 Answers0