Search code examples
solrspell-checking

Spell checking with Solr


I use Solr to index documents (pdf, word, .txt, etc). I need to use spell checker (in french) but I don't know how to do this. I need this function only on the field "content" the type of this field is text_general.


Solution

  • The spellchecker uses the content of your index to build the terms that are used for suggestions - there is no language configuration, since as long as the content that has been indexed is French, the suggestion back to the user will be based on those terms.

    The exception is if you're using the FileBasedSpellChecker, where you provide a dictionary of terms with their correct spelling.

    # spellcheck.q is only necessary if you want to use a different query than your actual query
    &spellcheck=true&spellcheck.q=foo