Read Only Directory for Lucene

In Lucene FAQ 1.8, you can read that can be used in CD-ROM-based Online Documentation Search, but if you try to use it with an index built on CD-ROM, it will not work. This happen because implementation of org.apache.lucene.store.Directory needs write access right to manage concurrent write operations. But on CD-ROM nobody can write, so I rewrote the class org.apache.lucene.store.FSDirectory to meet this requirement.

The result is the class it.unige.csita.lucene.RODirectory (Read Only Directory).

Download

You can download RODirectory version 0.1 in a jar file (26 kbyte) including source and javadocs.