public void undeleteDocuments() { LuceneIndexReader reader = IndexReaderFactoryUtils.getIndexReader(indexFactory); try { reader.undeleteAll(); } catch (IOException ex) { throw new LuceneIndexAccessException("Error during undeleting all documents.", ex); } finally { IndexReaderFactoryUtils.releaseIndexReader(indexFactory, reader); } }