lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: spell checker
Date Wed, 27 Sep 2006 00:35:20 GMT


I've added a FAQ that may help you with this, "How do i get code written
for Lucene 1.4.x to work with Lucene 2.x?"

http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-d09fdfc8a6335eab4e3f3dc8ac41a40a3666318e



: Date: Tue, 26 Sep 2006 20:56:57 -0000
: From: Chris Salem <chris@mainsequence.net>
: Reply-To: java-user@lucene.apache.org, Chris Salem <chris@mainsequence.net>
: To: java-user@lucene.apache.org
: 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
: chris@mainsequence.net
:
: (The following links were included with this email:)
: http://today.java.net/pub/a/today/2005/08/09/didyoumean.html?page=1
:
: mailto:chris@mainsequence.net
:
:
:
: (The following links were included with this email:)
: http://today.java.net/pub/a/today/2005/08/09/didyoumean.html?page=1
:
: mailto:chris@mainsequence.net
:
:
:



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message