lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "saikrishna venkata pendyala" <pvsaikris...@gmail.com>
Subject Re : Spell Checker Index
Date Sat, 20 Jan 2007 13:51:35 GMT
Hai all,
         This is what I did.
         """
         IndexReader reader = IndexReader.open("index");
         //static final File INDEX_DIR = new File("index");
         Directory directory = new RAMDirectory(index);
         SpellChecker spellchecker = new SpellChecker(directory);
         // To index a field of a user index:
         spellchecker.indexDictionary(new
LuceneDictionary(reader,"content"));
         String[] suggestions = spellchecker.suggestSimilar("fredom", 5);
         """

The problem with above code is every time I run the code it is indexing text
in "content" field.
                       {
spellchecker.indexDictionary(newLuceneDictionary(reader,"content"));
}
Is there any way I could save the spell checker index and use it straight
away.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message