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.

Reply via email to