On 22/09/2011 13:57, Paul Taylor wrote:
On 22/09/2011 11:56, Paul Taylor wrote:
Id made just a few changes to my code to remove deprecations that ocurred when I upgraded to Lucene 3.1, all tests work fine but when I tried to build a real index it gives this error during optimization stage

Exception in thread "main" java.nio.channels.OverlappingFileLockException at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166) at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068)
    at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:868)
    at java.nio.channels.FileChannel.tryLock(FileChannel.java:962)
at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:216)
    at org.apache.lucene.store.Lock.obtain(Lock.java:72)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1097)
at org.musicbrainz.search.index.ThreadedIndexWriter.<init>(ThreadedIndexWriter.java:66) at org.musicbrainz.search.index.IndexBuilder.createIndexWriter(IndexBuilder.java:229) at org.musicbrainz.search.index.IndexBuilder.main(IndexBuilder.java:152)

Using

fsDir = FSDirectory.open(new File(path), NoLockFactory.getNoLockFactory() );

does work but dont see why this is neccessary.

But this might be a speed improvement I could make anyway, although Im building multiple indexes, any one index is only being built by one thread, and the indexes are not being accessed by any index reader whilst being built

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to