I assume if your user queries "delll" and it breaks it into pieces like "de l l l", then you're probably using WordBreakSolrSpellChecker in addition to DirectSolrSpellChecker, right? If so, then you can specify "minBreakLength" in solrconfig.xml like this:
<searchComponent name="spellcheck" class="solr.SpellCheckComponent"> ... spellcheckers here ... <lst name="spellchecker"> <str name="name">wordbreak</str> <str name="classname">solr.WordBreakSolrSpellChecker</str> ... parameters here ... <int name="minBreakLength">5</int> </lst> </searchComponent> One note is that both DirectSolrSpellChecker and WordBreakSolrSpellChecker operate directly on the terms dictionary and do not have a separate dictionary like IndexBasedSpellChecker. The only way to prevent a word from being in the dictionary then is to filter this out in the analysis chain. For instance, if you use <copyField /> to build a field just for spellchecking, you can use LengthFilterFactory to remove the short terms. See http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.LengthFilterFactory . James Dyer Ingram Content Group (615) 213-4311 -----Original Message----- From: Rohan Thakur [mailto:rohan.i...@gmail.com] Sent: Thursday, April 04, 2013 1:42 PM To: solr-user@lucene.apache.org Subject: how to avoid single character to get indexed for directspellchecker dictionary hi all I am using solr directspellcheker for spell suggestions using raw analyses for indexing but I have some fields which have single characters like l L so its is been indexed in the dictionary and when I am using this for suggestions for query like delll its suggesting de and l l l as the spell correction as my index has de and l as single characters in the fields. please help. thanks regards Rohan