15 mar 2007 kl. 15.33 skrev Ryan O'Hara:

My question basically was is there a spellchecker-2.*1*-rc1-dev.jar?

There has been changes since 2.0. You can also take a look at this:

https://issues.apache.org/jira/browse/LUCENE-632


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)

Do you have the source of SpellChecker.java available too? What is on and around 298?

And what line of code below is row 52?



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.

--
karl


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

Reply via email to