Michael Duval wrote: > I've hacked the code for the time being by updating FSDirectory and
replaced all System.getProperty("java.io.tmpdir")
calls with a call to a new method "getLockDir()". This method checks for a "lucene.lockdir" prop before the
"java.io.tmpdir" prop giving the end user a bit more flexibility in where locks are stored.
In general, I support this change.
Here is the method:
/** Allow flexible locking directories - Michael R. Duval 3/02/04 */ private String getLockDir() { String lockDir;
if ((lockDir = System.getProperty("lucene.lockdir")) == null) return System.getProperty("java.io.tmpdir"); else return lockDir; }
In particular, I have some quibbles. The property should be named something like "org.apache.lucene.lockdir", not just "lucene.lockdir". And there's no reason to look it up each time: it can just be a static.
private static final String LOCK_DIR = System.getProperty("org.apache.lucene.lockdir", System.getProperty("java.io.tmpdir"));
Doug
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]