title: How to configure Solr suggester?
body: <p>In <strong>solrconfig.xml</strong>,</p>
  
  <p>Added a search component as below,</p>
  
  <pre><code>&lt;searchComponent class="solr.SuggestComponent" name="suggest"&gt;
    &lt;lst name="suggester"&gt;
      &lt;str name="name"&gt;suggest&lt;/str&gt;
      &lt;str name="lookupImpl"&gt;FSTLookupFactory&lt;/str&gt;
      &lt;str name="dictionaryImpl"&gt;DocumentDictionaryFactory&lt;/str&gt;
      &lt;str name="field"&gt;suggestions&lt;/str&gt; //indexed field of type textspell
      &lt;str name="weightField"&gt;price&lt;/str&gt;&lt;!-- 
      &lt;float name="threshold"&gt;0.005&lt;/float&gt; --&gt;
      &lt;str name="buildOnCommit"&gt;true&lt;/str&gt;
      &lt;str name="suggestAnalyzerFieldType"&gt;string&lt;/str&gt;
    &lt;/lst&gt;
  &lt;/searchComponent&gt;
  </code></pre>
  
  <p>Then added a request handler to handle suggestions as below,</p>
  
  <pre><code>&lt;requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy"&gt;
  &lt;lst name="defaults"&gt;
      &lt;str name="suggest"&gt;true&lt;/str&gt;
      &lt;str name="suggest.count"&gt;10&lt;/str&gt;
      &lt;str name="suggest.dictionary"&gt;suggest&lt;/str&gt;
  &lt;/lst&gt;
  &lt;arr name="components"&gt;
      &lt;str&gt;suggest&lt;/str&gt;
  &lt;/arr&gt;&lt;/requestHandler&gt;
  </code></pre>
  
  <p>In <strong>schema.xml</strong> added a <code>field</code> named <code>suggestions</code> as ,</p>
  
  <pre><code>&lt;field  name="suggestions" type="textSpell" indexed="true" stored="false" multiValued="true" /&gt;
  </code></pre>
  
  <p>of <code>field type</code> <code>textSpell</code> defined as ,</p>
  
  <pre><code>&lt;fieldType class="solr.TextField" name="textSpell" positionIncrementGap="100"&gt;
   &lt;analyzer&gt;
     &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt;
     &lt;filter class="solr.StandardFilterFactory"/&gt;
     &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
   &lt;/analyzer&gt;&lt;/fieldType&gt;
  </code></pre>
  
  <p>After <code>restarting</code> and <code>reindexing</code> particular <code>core</code> named <code>libshelf</code> when I query,</p>
  
  <pre><code>http://localhost:8983/solr/libshelf/suggest?suggest=true&amp;suggest.build=true&amp;suggest.dictionary=suggest&amp;wt=json&amp;suggest.q=c
  </code></pre>
  
  <p>the result is,</p>
  
  <pre><code>{
  "responseHeader": {
      "status": 0,
      "QTime": 32
  },
  "command": "build",
  "suggest": {
      "suggest": {
          "c": {
              "numFound": 0,
              "suggestions": []
          }
      }
  }}
  </code></pre>
  
  <p>More over the since the <code>dicionaries</code> for suggestions are based on <code>indexed</code> fields <code>pagecontent</code> and <code>pagetitle</code>, have created two <code>copyfields</code> to <code>seed</code> the <code>suggesters</code> as below,</p>
  
  <pre><code>&lt;copyField source="pagecontent" dest="suggestions"/&gt;
  &lt;copyField source="pagetitle" dest="suggestions"/&gt;
  </code></pre>
  
  <p>How to resolve this issue?</p>