SpellChecker locks folder

2009-04-22 Thread John Cherouvim
Hello After I call the SpellChecker.indexDictionary method the directory which contained the lucene index is locked. I cannot rename of delete the folder (windows). In the source of SpellChecker lines 352-353 I see that after the indexing is done the index is reopened: searcher.close(); sea

Re: SpellChecker AlreadyClosedException issue

2009-04-10 Thread John Cherouvim
dir is a local variable inside a method, so it's not getting reused. Should I synchronise the whole method? I think that would slow things down in a concurrent environment. Thanks for your response. Chris Hostetter wrote: : My code looks like this: : : Directory dir = null; : try { :di

SpellChecker AlreadyClosedException issue

2009-04-02 Thread John Cherouvim
Hello My code looks like this: Directory dir = null; try { dir = FSDirectory.getDirectory("/path/to/dictionary"); SpellChecker spell = new SpellChecker(dir); // exception thrown here // ... dir.close(); } catch (IOException ex) { log error } finally { if (dir!=null) { tr

lucene and UTF-8

2005-09-29 Thread John Cherouvim
Hello I'm having some problems indexing my UTF-8 html pages. I am running lucene on Linux and I cannot understand why does the index generated depends on the locale of my operating system. If I do set | grep LANG I get: LANG=el_GR which is Greek. If I set this to en_US the index generated will