I'm getting the following error trying to instantiate an IndexModifier on a RAMDirectory index:
java.io.IOException: Lock obtain timed out: [EMAIL PROTECTED] at org.apache.lucene.store.Lock.obtain(Lock.java(Compiled Code)) at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:254) at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:244) at org.apache.lucene.index.IndexModifier.init(IndexModifier.java:148) at org.apache.lucene.index.IndexModifier.<init>(IndexModifier.java:111) ... Here's some background: I have a web application where, upon startup, this RAMDirectory is created and loaded with a set of values from 2 databases. When a user makes a call to do a delete or add of data, it should update not only the database (obviously) but also the RAMDirectory index, such that the 2 are always in sync with one another. It was my thought to have a static class which calls an update method on itself every X number of minutes to recreate/reload the RAMDirectory index from the database -- this in addition to the simultaneous updates to RAMDirectory (removal of documents and adding of documents) and database to keep the data in sync. Then, I should be able to just use searching capabilities that Lucene offers to get the data requested by the user, rather than issuing tons of select queries to the databases. What is causing this error, and how do I fix? What would be a good approach for achieving the goal of database and index synchronization? Thanks in advance, Philip -- View this message in context: http://www.nabble.com/Lock-error-attempting-update-of-RAMDirectory-index-tf2199620.html#a6089447 Sent from the Lucene - Java Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]