WordBreakSolrSpellChecker offers suggestions by combining adjacent query
terms and/or breaking terms into multiple words. It is a SpellCheckComponent
enhancement, leveraging Lucene's WordBreakSpellChecker. It can detect
spelling errors resulting from misplaced whitespace without the use of
shingle-based dictionaries and provides collation support for word-break
errors, including cases where the user has a mix of single-word spelling
errors and word-break errors in the same query. It also provides shard
support.


Here is how it might be configured in solrconfig.xml:

<http://lucene.472066.n3.nabble.com/file/n4164997/Screen_Shot_2014-10-20_at_9.png>
 


Some of the parameters will be familiar from the discussion of the other
spell checkers, such as name, classname, and field. New for this spell
checker is combineWords, which defines whether words should be combined in a
dictionary search (default is true); breakWords, which defines if words
should be broken during a dictionary search (default is true); and
maxChanges, an integer which defines how many times the spell checker should
check collation possibilities against the index (default is 10).
The spellchecker can be configured with a traditional checker (ie:
DirectSolrSpellChecker). The results are combined and collations can contain
a mix of corrections from both spellcheckers.

Add It to a Request Handler

Queries will be sent to a RequestHandler. If every request should generate a
suggestion, then you would add the following to the requestHandler that you
are using:

<http://lucene.472066.n3.nabble.com/file/n4164997/2.png> 

For more details, you can read the below tutorial 

https://cwiki.apache.org/confluence/display/solr/Spell+Checking



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Word-Break-Spell-Checker-Implementation-algorithm-tp4164955p4164997.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to