1

I have migration from Sitecore 8.2 to Sitecore 9.1.1.

I have an issue with suggester not working after Solr migration from 5.1.0 to Solr 7.2.1.

I am not getting any suggest results back from the suggester configuration. The data is definitely getting populated in the index as I can see it using Solr web interface. I have tried all the configuration on the Solr end but I am not getting any thing back. Below is my configuration in Solr:

Managed-schema.xml

<fieldType name="suggestType" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
        <charFilter class="solr.PatternReplaceCharFilterFactory" pattern="[^a-zA-Z0-9]" replacement=" " />
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
</fieldType>     

Configuration in SolrConfig.xml

<searchComponent name="suggest" class="solr.SuggestComponent">
  <lst name="suggester">
    <str name="name">fuzzySuggester</str>
    <!--<str name="lookupImpl">FuzzyLookupFactory</str> -->
    <str name="lookupImpl">AnalyzingInfixLookupFactory</str> -->
    <str name="dictionaryImpl">DocumentDictionaryFactory</str>
    <str name="field">_content</str>
    <!-- <str name="weightField">price</str> -->
     <str name="buildOnCommit">true</str>
    <str name="suggestAnalyzerFieldType">suggestType</str>
    <str name="buildOnStartup">true</str>
    <str name="highlight">false</str>
  </lst>
</searchComponent>

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

Tried following direct calls to Solr in the browser:

https://localhost:8984/solr/search_suggestions_index_master/suggest?q=water&wt=json
Response:
{
  "responseHeader":{
    "status":0,
    "QTime":62},
  "command":"build"}

and

https://localhost:8984/solr/search_suggestions_index_master/suggest?q=water&wt=json
{
  "responseHeader":{
    "status":0,
    "QTime":1},
  "suggest":{"fuzzySuggester":{
      "water":{
        "numFound":0,
        "suggestions":[]}}}}
2

I had similar issue. Try to remove dictionaryImpl param in solrConfig.

This is my working configuration to compare:

 <searchComponent name="suggest" class="solr.SuggestComponent">
    <lst name="suggester">
      <str name="name">mySuggester</str>
      <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
      <str name="field">pagecontent_t</str>
      <str name="suggestAnalyzerFieldType">text_general</str>
      <str name="buildOnStartup">true</str>
    </lst>
  </searchComponent>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.