Re: Can't start Lucene App: java.io.FileNotFoundException with brand new directory

2010-01-23 Thread jchang
I figured it out...but the answer leads to a new question. The problem was that I was using this constructor: IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl) I passed in false for create, and if there is no index yet, it fails as I described. As soon as I p

Can't start Lucene App: java.io.FileNotFoundException with brand new directory

2010-01-23 Thread jchang
When I try to start my service and construct an IndexWriter, I get this: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.NIOFSDirectory@/home/jchang/IdeaProjects/index-service_trunk/target/testindexA/index/indexablemaildata: files: [write.lock] It is odd. The

are Lucene queries thread-safe?

2010-01-23 Thread Paul Libbrecht
Hello list, for some strange reason I wish to cache very frequent (and big, ~3000 terms) queries. Now, this might mean that a query is searched for in several threads on the same index. Do I run a risk? thanks in advance paul --