Search code examples
solrsolr6

Solr Suggester - Store Lookup build failed


I've exhausted my search efforts as to why this isn't working. I believe I'm following the documentation correctly found at https://cwiki.apache.org/confluence/display/solr/Suggester

However, every time I attempt to build the suggester, I receive the error "SolrSuggester - Store Lookup build failed." in the logs. I can see it creating the directory for the store correctly on disk, however, there is no data within the file.

I've also tried removing the line <str name="storeDir">fuzzy_dir</str>. If I do this and try building, I don't receive the error in the logs, however, I still receive no results.

Can anyone see what I may be doing wrong?

I'm using Solr 6.5.0.

Here is what I have in my schema.xml:

<field name="name" type="text_general" indexed="true" stored="true" required="true" multiValued="false" />
<field name="term" type="suggestType" indexed="true" stored="true" />
<copyField source="name" dest="term" />

<fieldType name="suggestType" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StandardFilterFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
</fieldType>

Here is what I have in my solrconfig.xml:

<searchComponent name="suggest" class="solr.SuggestComponent">
    <lst name="suggester">
        <str name="name">fuzzySuggester</str>
        <str name="lookupImpl">FuzzyLookupFactory</str>
        <str name="storeDir">fuzzy_dir</str>
        <str name="dictionaryImpl">DocumentDictionaryFactory</str>
        <str name="field">term</str>
        <str name="suggestAnalyzerFieldType">suggestType</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="suggest">true</str>
    <str name="suggest.dictionary">fuzzySuggester</str>
    <str name="suggest.count">5</str>
  </lst>
  <arr name="components">
    <str>suggest</str>
  </arr>
</requestHandler>

This is how I'm executing the build:

http://localhost:8983/solr/my_core/suggest?suggest.build=true

Solution

  • After endless hours of scouring the internet and attempting suggestions provided by others on this post, I've come to the conclusion something in my solrconfig.xml or schema.xml file was corrupt.

    My fix was to create a completely new core and migrate the pieces I was using in solrconfig.xml and schema.xml to get it to work. Unfortunately I don't have a better answer, but this is what I had to do in order to solve the problem.