Hi,
I'm still mostly a beginner, both with Java and Lucene, so I apologize
if this may be  dumb questions. 

Is making index-modifying operations "safe" as simple just doing the
following?

synchronized (writer) {

        while (IndexReader.isLocked(directory))
                wait();
        writer.addDocument(document);
        writer.optimize();
        writer.close();
        notifyAll();

}


Also, should the IndexWriter or IndexReader be static (since you can't
have more than one open anyways?) or is there a reason to make it
non-static?

Thanks!
Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to