title: Upload Dictionary in Solr for Spell Check
body: <p>I'm running into this problem this Solr: Solr can only spell check and give suggestions based on the files in the database. However, I want to add an English dictionary, so even if the word doesn't exist in the database, Solr can give suggestions based on the English dictionary.</p>
  
  <p>I know I have to do this using a FileBasedSpellChecker in solrconfig.xml:   </p>
  
  <pre><code> &lt;searchComponent name=”spellcheck” class=”solr.SpellCheckComponent”&gt;
           &lt;lst name=”spellchecker”&gt;
               &lt;str name=”classname”&gt;solr.FileBasedSpellChecker&lt;/str&gt;
               &lt;str name=”name”&gt;file&lt;/str&gt;
               &lt;str name=”sourceLocation”&gt;spellings.txt&lt;/str&gt;
               &lt;str name=”characterEncoding”&gt;UTF-8&lt;/str&gt;
               &lt;str name=”spellcheckIndexDir”&gt;./spellcheckerFile&lt;/str&gt;
           &lt;/lst&gt;
       &lt;/searchComponent&gt;
  </code></pre>
  
  <p>But I don't know how I can upload spellings.txt to Solr. I'm getting this error:</p>
  
  <pre><code>{
    "responseHeader":{
      "status":404,
      "QTime":1},
    "response":{"numFound":0,"start":0,"docs":[]
    },
    "error":{
      "metadata":[
        "error-class","org.apache.solr.common.SolrException",
        "root-error-class","org.apache.solr.common.SolrException"],
      "msg":"Specified dictionaries do not exist: file",
      "code":404}}
  </code></pre>
  
  <p>Any help would be greatly appreciated. Thanks.</p>