You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Kevin Oliver <ke...@mac.com> on 2004/08/10 19:22:22 UTC

FSDirectory.LOCK_DIR

Is there a reason in 1.4 you can no longer place the lock files alongside the index files? Or if there is, I was unable to figure it out or track it down on the mailing lists.

The constructor for FSDirectory looks like it has the intentions of allowing this, but I'm thinking it is not possible under typical situations. The code will use the directory where the index files live if LOCK_DIR is null, yet I cannot set it to this in my environment. The code for initializing the final LOCK_DIR constant takes the org.apache.lucene.lockdir system property, and if it doesn't exist, then it defaults to the java.io.tmpdir system property. Unfortunately, properties extend hashtables, which in turn means that you cannot set a property to null. 

I tried what Doug Cutting suggested in a post regarding this, but it appears it wasn't implemented. So it just ends up using the working directory from which the application was launched. http://www.mail-archive.com/lucene-dev@jakarta.apache.org/msg05018.html

I do like his suggestion, but another option that would be backwards compatible would be adding another system property (something like org.apache.lucene.storeLocksWithIndex). I'm more than willing to contribute a patch for whatever option the community thinks is best.

Any thoughts or comments? 
-Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org