有没有办法获取 solr 拼写检查索引中所有单词的列表?

Is there a way to get a list of all the words in the solr spellcheck index?

我将 Solr 的 SpellCheckComponent 与 IndexBasedSpellChecker 一起使用。想知道有没有办法得到字典中所有单词的输出。

可能会帮助我们找出网站上的一些拼写错误。

是的,有。 IndexBasedSpellChecker,根据doc:"The IndexBasedSpellChecker uses a Solr index as the basis for a parallel index used for spell checking. It requires defining a field as the basis for the index terms "

因此它只使用您从索引中选择的一个字段。要枚举字段上的所有术语,您可以使用 Terms component 并将 terms.fl 设置为该字段。如果你有很多术语,你可以玩 terms.lowerterms.limitterms.upper 在多个调用中获取信息。