使用 Solr 进行拼写检查

Spell checking with Solr

我使用 Solr 来索引文档(pdf、word、.txt 等)。我需要使用拼写检查器(法语),但我不知道该怎么做。我只在字段 "content" 上需要这个函数,这个字段的类型是 text_general

拼写检查器使用 content of your index to build the terms that are used for suggestions - 没有语言配置,因为只要索引的内容是法语,返回给用户的建议将基于这些术语。

例外情况是,如果您使用 FileBasedSpellChecker,您可以在其中提供包含正确拼写的术语词典。

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