Spell checker implementations available with Solr
Let us go through the different spell checker implementations available with Solr:
DirectSolrSpellChecker
: This implementation does not require a separate index to be built for spell checking. It uses the main Solr index for spelling suggestions.IndexBasedSpellChecker
: This implementation is used to create and maintain a spelling dictionary that is based on the Solr index. Since a separate index is created and maintained, we need to build/rebuild the index whenever the main index changes. This can be done automatically by enablingbuildOnCommit
orbuildOnOptimize
in the configuration. Also, we need to specify the location of the index to be created using thespellcheckIndexDir
variable in our Solr spellcheck component configuration.Note
The
buildOnCommit
component is very expensive. It is recommended to usebuildOnOptimize
or explicit build usingspellcheck.build=true
in Solr URL.FileBasedSpellChecker
: This implementation uses a flat file...