spellings.txt
This file provides a file-based spell check and can be enabled by specifying the following code in solrconfig.xml
:
<searchComponent name="spellcheck" class="solr.SpellCheckComponent"> <lst name="spellchecker"> <str name="classname">solr.FileBasedSpellChecker</str> <str name="name">file</str> <str name="sourceLocation">spellings.txt</str> <str name="characterEncoding">UTF-8</str> <str name="spellcheckIndexDir">./spellcheckerFile</str> </lst> </searchComponent>
In this file, you can write a list of correct words. This file is used to define a dictionary for users. You need to enter each word on a new line as follows:
solr solar
Once the dictionary is created, it needs to be built by calling spellcheck.build
using the following URL:
http://<solr-url>/select?q=*:*&spellcheck=true&spellcheck...