Issue Details (XML | Word | Printable)

Key: LUCENE-1152
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Otis Gospodnetic
Reporter: Naveen Belkale
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

SpellChecker does not work properly on calling indexDictionary after clearIndex

Created: 25/Jan/08 12:49 PM   Updated: 22/May/08 06:21 AM
Return to search
Component/s: contrib/spellchecker
Affects Version/s: 2.3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works spellchecker.diff 2008-05-21 10:06 AM Naveen Belkale 2 kB
File Licensed for inclusion in ASF works spellchecker.diff 2008-01-25 12:52 PM Naveen Belkale 3 kB

Lucene Fields: Patch Available, New
Resolution Date: 22/May/08 06:21 AM


 Description  « Hide
We have to call clearIndex and indexDictionary to rebuild dictionary from fresh. The call to SpellChecker clearIndex() function does not reset the searcher. Hence, when we call indexDictionary after that, many entries that are already in the stale searcher will not be indexed.

Also, I see that IndexReader reader is used for the sole purpose of obtaining the docFreq of a given term in exist() function. This functionality can also be obtained by using just the searcher by calling searcher.docFreq. Thus, can we get away completely with reader and code associated with it like
if (IndexReader.isLocked(spellIndex)){ IndexReader.unlock(spellIndex); }
and the reader related code in finalize?



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #659013 Thu May 22 06:21:17 UTC 2008 otis LUCENE-1152 Fix for calling indexDictionary after clearIndex call
Files Changed
MODIFY /lucene/java/trunk/CHANGES.txt
MODIFY /lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java