: Even if it's very briefly whilst opening the index - a writelock is a : writelock. If anyone has any trick to work around these locks (how brief
I didn't say "writelock" i said "lock" .... specifically it's a "commit lock" that's used, and if there is any possibility whatsoever that some other IndexReader or IndexWriter will be attempting to modify the index at the moment you are opening your IndexReader, that commit lock is neccessary to ensure that your reader gets a uniform list of the segments. If you are 100% certain that your indiex can't be modified at any time (ie: it's on a CD or something like that) you can use the FSDirectory.setDisableLocks(true) method to tell Lucene not to bother. -Hoss
