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
Naveen Belkale made changes - 25/Jan/08 12:52 PM
Field Original Value New Value
Attachment spellchecker.diff [ 12374030 ]
Naveen Belkale made changes - 25/Jan/08 02:11 PM
Priority Major [ 3 ] Minor [ 4 ]
Lucene Fields [Patch Available, New] [New, Patch Available]
Otis Gospodnetic made changes - 17/May/08 04:41 AM
Component/s contrib/* [ 12312028 ]
Assignee Otis Gospodnetic [ otis ]
Component/s contrib/spellchecker [ 12312332 ]
Naveen Belkale made changes - 21/May/08 10:06 AM
Attachment spellchecker.diff [ 12382449 ]
Otis Gospodnetic made changes - 22/May/08 06:21 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]