Hello, Any advice on the following suggester not suggesting issue would be very welcome.
I can get suggestions when using a spell checker but not when using the suggester. Both types are querying the same suggestion field. I'm using the following settings: <field name="suggestion" type="text_suggest" indexed="true" stored="true" multiValued="true"/> <fieldType name="text_suggest" class="solr.TextField" positionIncrementGap="100" multiValued="true"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> I've tried using different field types for suggestion. I read that the field shouldn't be heavily processed with stemmers for instance, I tried with string but it made no difference. <copyField source="title" dest="suggestion"/> <copyField source="description" dest="suggestion"/> <copyField source="organizer" dest="suggestion"/> <copyField source="location" dest="suggestion"/> I've tried with about 6 different examples from online, and none return results, below is an example of one, the other examples were variations using FuzzyLookupFactory instead. <searchComponent name="suggest5" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">mySuggester</str> <str name="lookupImpl">FSTLookupFactory</str> <str name="dictionaryImpl">DocumentDictionaryFactory</str> <str name="field">suggestion</str> <str name="suggestAnalyzerFieldType">string</str> </lst> </searchComponent> <requestHandler name="/suggest5" class="solr.SearchHandler" startup="lazy"> <lst name="defaults"> <str name="suggest">true</str> <str name="suggest.count">10</str> <str name="suggest.dictionary">mySuggester</str> </lst> <arr name="components"> <str>suggest5</str> </arr> </requestHandler> http://localhost:8983/solr/events/suggest5?suggest.dictionary=mySuggester&suggest=true&suggest.build=true&suggest.q=edu http://localhost:8983/solr/events/suggest5?q=edu <http://localhost:8983/solr/events/suggest5?q=education> both return { "responseHeader":{ "status":0, "QTime":4}, "suggest":{"mySuggester":{ "edu":{ "numFound":0, "suggestions":[]}}}} spell checker returns a couple of results for this. I was restarting solr after making any changes. This is the setup for the spellchecker: <searchComponent class="solr.SpellCheckComponent" name="suggest"> <str name="queryAnalyzerFieldType">string</str> <lst name="spellchecker"> <str name="name">suggest</str> <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> <str name="lookupImpl">FuzzyLookupFactory</str> <str name="suggestAnalyzerFieldType">string</str> <str name="field">suggestion</str> <float name="threshold">0.00001</float> <str name="spellcheckIndexDir">spellchecker</str> <str name="comparatorClass">freq</str> <str name="buildOnOptimize">true</str> <float name="accuracy">0.5</float> <!--<str name="buildOnCommit">true</str>--> </lst> </searchComponent> <requestHandler class="solr.SearchHandler" name="/suggest"> <lst name="defaults"> <str name="spellcheck">on</str> <str name="spellcheck.dictionary">suggest</str> <str name="spellcheck.onlyMorePopular">true</str> <str name="spellcheck.extendedResults">true</str> <str name="spellcheck.count">10</str> <str name="spellcheck.collate">true</str> <str name="spellcheck.maxCollations">10</str> <str name="spellcheck.maxCollationTries">5</str> </lst> <arr name="components"> <str>suggest</str> </arr> </requestHandler> I'm trying to get an old version 4 config working updated to work with 8.5 Am I missing out by not being able to use the dedicated suggester? Is the field type for suggestion optimal? Many thanks in advance. Best, Phil. <searchComponent class="solr.SpellCheckComponent" name="suggest"> <str name="queryAnalyzerFieldType">string</str> <lst name="spellchecker"> <str name="name">suggest</str> <str name="classname">org.apache.solr.spelling.suggest.Suggester</str> <str name="lookupImpl">FuzzyLookupFactory</str> <str name="suggestAnalyzerFieldType">string</str> <str name="field">suggestion</str> <float name="threshold">0.00001</float> <str name="spellcheckIndexDir">spellchecker</str> <str name="comparatorClass">freq</str> <str name="buildOnOptimize">true</str> <float name="accuracy">0.5</float> </lst>