Solr configuration for spell check
The demo schema and configuration that comes with Solr installation already has spell check configured in it. Let us look at its settings:
Open up
solrconfig.xml
inside<solr_dir>/example/solr/collection1/conf
.Search for
searchComponent
by the name ofspellcheck
.Inside the
spellcheck
component there are multiple spellchecker(s). Here is thedefault
spellchecker that comes along with Solr:<lst name="spellchecker"> <str name="name">default</str> <str name="field">text</str> <str name="classname">solr.DirectSolrSpellChecker</str> <float name="accuracy">0.5</float> <int name="maxEdits">2</int> <int name="minPrefix">1</int> <int name="maxInspections">5</int> <int name="minQueryLength">4</int> <float name="maxQueryFrequency">0.01</float> <float name="thresholdTokenFrequency">.01</float> </lst>
The preceding block of code shows...