lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Multi-Index Spellchecker
Date Mon, 20 Nov 2006 20:02:59 GMT

: Does anyone have any interested in making the spellchecker work across more
: than one index? Does the coder of the spellchecker have any advice/dont do
: that moron info etc ?

Doesn't it already? ... the SpellChecker class doesn't seem to care if you
call indexDictionary more then once ... so you can make multiple
LuceneDictionary instances from your multiple indexes, and add all of

  SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
  // To use terms from field a of index1
  spellchecker.indexDictionary(new LuceneDictionary(reader1, a_field));
  // To use terms from field b of index1
  spellchecker.indexDictionary(new LuceneDictionary(reader1, b_field));
  // To use terms from field c of index2
  spellchecker.indexDictionary(new LuceneDictionary(reader2, c_field));
  String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);

...or am i missing something here?

(disclaimer: i've never acctually used SpellChecker, just skimmed the


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message