Are the following lines of code acceptable to get a hot backup of a lucene index or IndexWriter/SnapshotDeletionPolicy as described in Lucene index backup should be followed?
Directory dir = ...;
IndexReader reader = IndexReader.open(dir);
IndexCommit commit = reader.getIndexCommit();
Collection<String> fileNames = commit.getFileNames();
//copy the files
reader.close();
Even on a locked index you may open a reader on a commit point while a writer may still change the index.