(disclaimer: i've never acctaully used the SpellChecker contib, just read
the docs)

: I've been reading through the spelling correction API and I'm confused.
: It looks like you tell it the directory to hold the spelling correction
: DB and then give it an IndexReader and a field to retrieve spelling
: suggestions from.

not exactly: you start by constructing a SpellChecker instance specifying
the Directory it should use to store it's built up datastructures (which
just so happen to be a Lucene index with a special set of fields)

now you have an empty SpellChecker oject.

You can then call the indexDictionary method passing it anything you want
that impliments the Dictionary interface -- a handy LuceneDictionary
implimentations is provided so you can add all of hte words in a field of
your choice from an existing Lucene index.

now you've got a populated SpellChecker object that's usable.  you can
make other instances of it in the future by resuing the same Directory.

: But then I'd have to redo that operation everytime a new document was
: indexed. There didn't seem to be any apparent way to incrementally add
: new documents without creating my own dictionary by splitting up words
: from the incoming document.

just call the indexDictionary method again on some simple Dictionary
implimentation and the new words will be added.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to