public void shutdown() { try { for (IndexSearcher searcher : indexSearchers.values()) { searcher.close(); } indexSearchers.clear(); optimize(); for (IndexWriterContext writer : indexWriters.values()) { writer.writer.close(); } indexWriters.clear(); } catch (IOException e) { throw new RuntimeException(e); } }
/** Closes this index service and frees all resources. */ public void close() { for (IndexSearcher searcher : indexSearchers.values()) { try { searcher.close(); } catch (IOException e) { e.printStackTrace(); } } indexSearchers.clear(); }
@Override public void stop() { indexMap = new ArrayMap<String, List<PropertyIndex>>((byte) 5, true, false); idToIndexMap = new ArrayMap<Integer, PropertyIndex>((byte) 9, true, false); txCommitHooks.clear(); }