Affects Version/s: 5.0
Fix Version/s: None
java version "1.8.0_45"
Solaris or Linux
Lucene, using FSDirectory (via NIOFS directory) cannot open an index from a Path that is a symbolic link to an actual index directory. Trying to do so generates an exception stack like:
Exception in thread "main" java.nio.file.FileAlreadyExistsException: maildex.idx
This problem occurs on both Linux and Solaris (which probably use the same SPI for Unix file systems at the bottom of the java.nio.file stack.)
This problem has been noted in the OpenJDK issue tracker at:
And closed as "Not an Issue" because Files.createDirectories is meant to operate on directories, and a symlink is not a directory. This doesn't strike me as particularly helpful, but I guess is sort of makes sense in a broken-by-design way.
The work-around is simply to move or copy the index to the place where I want it, but this makes concurrent read-only development on the index difficult when the index is large.