List of usage examples for org.apache.lucene.index IndexWriter getReader
DirectoryReader getReader() throws IOException
From source file:util.IndexTools.java
License:Open Source License
public IndexTools(IndexWriter indexWriter) { try {/*w ww. j a v a 2s . co m*/ ir = indexWriter.getReader(); is = new IndexSearcher(ir); } catch (IOException e) { AppLogger.error.log(Level.SEVERE, "Could not access index at location " + indexWriter.getDirectory() + " for reading"); throw new RuntimeException("Exiting application", e); } }