My question basically was is there a spellchecker-2.*1*-rc1-dev.jar?
The problems I'm having...
Exception:
java.lang.NullPointerException
at
org.apache.lucene.search.spell.SpellChecker.indexDictionary
(SpellChecker.java:298)
at DidYouMeanIndexer.createSpellIndex(DidYouMeanIndexer.java:
52)
at DidYouMeanIndexer.main(DidYouMeanIndexer.java:38)
Code:
public void createSpellIndex(String field,
Directory originalIndexDirectory,
Directory spellIndexDirectory) {
IndexReader indexReaderOriginal = null;
try {
indexReaderOriginal = IndexReader.open
(originalIndexDirectory);
LuceneDictionary dictionary = new LuceneDictionary
(indexReaderOriginal, field);
//*tried closing indexReaderOriginal here too*
SpellChecker spellChecker = new SpellChecker(spellIndexDirectory);
spellChecker.indexDictionary(dictionary);
} catch (Exception e){
printError(e);
} finally {
try {
indexReaderOriginal.close();
} catch (Exception e){
e.printStackTrace();
}
}
}
When I close indexReaderOriginal after the Dictionary is closed, I
get the same exact exception.
Thanks in advance,
Ryan
On Mar 15, 2007, at 1:34 AM, karl wettin wrote:
14 mar 2007 kl. 21.47 skrev Ryan O'Hara:
Is there a SpellChecker.jar compatible with Lucene 2.1. After
updating to Lucene 2.1, I seem to have lost the ability to create
a spell index using spellchecker-2.0-rc1-dev.jar. Any help would
be greatly appreciated.
Can you explain the problem more detailed? Exceptions? API changes?
--
karl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]