1

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
jaryd
  • 861
  • 12
  • 21

3 Answers3

0

you might be missing this in the fuzzySuggester:

<str name="weightField">WEIGHT</str>

even if the docs say it's an optional param, I think it might be what is messing with you. If you don't have a good field that you can use, you can just declare one like this:

<field name="WEIGHT" type="tfloat" indexed="true" stored="true" multiValued="false" />  

and just don't bother putting any data into it.

Persimmonium
  • 15,593
  • 11
  • 47
  • 78
  • I had actually tried that as well previously, but from your suggestion added it back in to give it another shot. Same result when trying to build. "SolrSuggester - Store Lookup build failed" – jaryd Apr 16 '17 at 18:17
  • I have one suggester running fine with this config mostly, it's just an AnalyzingInfixLookupFactory. You could try changing the lookupImpl param... – Persimmonium Apr 16 '17 at 21:16
0

Try giving suggester.dictionary=fuzzySuggester in the query.

http://localhost:8983/solr/my_core/suggest?suggest.build=true&suggester.dictionary=fuzzySuggester

vsri293
  • 541
  • 4
  • 7
  • This provided the same result error message as I've stated in my question. – jaryd Apr 22 '17 at 14:21
  • solrconfig looks good, issue can be in schema file. Does name field always present in your index else try required="false" build the index again and then try building the suggester. – vsri293 Apr 22 '17 at 18:14
0

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.

jaryd
  • 861
  • 12
  • 21