solrsolrjspell-checkingsolrcloud

Difference between IndexBasedSpellChecker and DirectSolrSpellChecker in Solr?


While going through SpellCheck feature in Solr, I found following types of solr SpellChecker

  1. IndexbasedSpellChecker
  2. DirectSolrSpellChecker
  3. FileBasedSpellChecker

What I understood from solr docs definition "The DirectSolrSpellChecker uses terms from the Solr index without building a parallel index like the IndexBasedSpellChecker" is, IndexbasedSpellChecker creates a parallel index and we need to rebuild this parallel index whenever there is a change in base index using which parallel index is built

But in DirectSolrSpellChecker no parallel index will be created so no need to rebuild again and again

My question is if creating parallel index is the only difference between these two spellcheck types, why did solr created new type DirectSolrSpellChecker in Solr4.0 release instead of updating IndexbasedSpellChecker.

Since they have not updated IndexbasedSpellChecker but created new type called DirectSolrSpellChecker my question is :

  1. What is the advantage of building parallel index(as in IndexbasedSpellChecker) and advantage of spell check without building parallel index(as in DirectSolrSpellChecker)

  2. What is the actual difference between IndexbasedSpellChecker and DirectSolrSpellChecker

  3. When should one use IndexbasedSpellChecker and DirectSolrSpellChecker


Solution

  • A part of the answer is in your question (the only difference being one requires its own index, not the other), but I would add :