The code works with Lucene 2.0, I've used it. However, it did change slightly. If you look in JIRA you'll find some comments about it. If I recall correctly, some changes I made to LuceneDictionary(?) class now require the index directory to exist....I think.
Otis ----- Original Message ---- From: Chris Salem <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Tuesday, September 26, 2006 4:56:57 PM Subject: spell checker Does anyone have sample code on how to build a dictionary? I found this article online and but it uses version 1.4.3 and it doesn't seem to work on 2.0.0: http://today.java.net/pub/a/today/2005/08/09/didyoumean.html?page=1 Here's the code I have: indexReader = IndexReader.open(originalIndexDirectory); Dictionary dictionary = new LuceneDictionary(indexReader, "experience_desired"); SpellChecker spellChckr = new SpellChecker(spellIndexDirectory); spellChckr.indexDictionary(dictionary); I'm getting a null pointer exception when I call indexDirectory(). Here's how I index the field "experience_desired": doc.add(new Field("experience_desired", value, Field.Store.NO, Field.Index.TOKENIZED)); Is there another way I should do it so there is a way to build a dictionary on that field? Thanks Chris Salem 440.946.5214 x5458 [EMAIL PROTECTED] (The following links were included with this email:) http://today.java.net/pub/a/today/2005/08/09/didyoumean.html?page=1 mailto:[EMAIL PROTECTED] (The following links were included with this email:) http://today.java.net/pub/a/today/2005/08/09/didyoumean.html?page=1 mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]