tags:

views:

47

answers:

1

How to i force Solr to return me suggestions or close matches even on correctly spelled words?

+1  A: 

Unfortunately, I don't think it is possible. The Lucene SpellChecker class (which is used by Solr), won't return suggestions if the word has a high frequency in your index. If you activate spellcheck.onlyMorePopular, Lucene will return suggestions that have a frequency >= than the frequency of the original word. So if a word is correctly spelled but is rare, you should receive suggestions. But for common words, you won't get anything.

UPDATE
I just stumble upon the FileBasedSpellChecker which does not use the frequency of the words of the query. I have never tried it. To use it, you will have to maintain a list of words in a flat file to build the dictionary.

Pascal Dimassimo
You are right for the first option. Second option might well be a testable case.
Wajih