Attempting to follow the documentation found here: 
https://cwiki.apache.org/confluence/display/solr/Suggester 

The example given in the documentation is not working. See below my 
configuration. I only changed the field names to those in my schema. Can anyone 
provide an example for this component that actually works? 

<searchComponent name="suggest" class="solr.SuggestComponent"> 
<lst name="suggester"> 
<str name="name">mySuggester</str> 
<str name="lookupImpl">FuzzyLookupFactory</str> 
<str name="dictionaryImpl">DocumentDictionaryFactory</str> 
<str name="field">sugg_allText</str> 
<str name="weightField">suggestWeight</str> 
<str name="suggestAnalyzerFieldType">string</str> 
</lst> 
</searchComponent> 

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

<field name="sugg_allText" type="string" indexed="true" multiValued="true" 
stored="false"/> 
<field name="suggestWeight" type="long" indexed="true" stored="true" 
default="1" /> 


http://localhost:8888/solr/collection1/suggest?suggest=true&suggest.build=true&suggest.dictionary=mySuggester&wt=json&suggest.q=kern
 

{"responseHeader":{"status":0,"QTime":4},"command":"build","suggest":{"mySuggester":{"kern":{"numFound":0,"suggestions":[]}}}}
 

Reply via email to