Пример #1
0
 /** Updates the cached indexes and replaces the current Lucene searcher with a new one. */
 @ThreadSafe
 @VisibleForPackageGroup
 public void replaceLuceneSearcher() {
   writeLock.lock();
   try {
     Closeables.close(luceneSearcher, false);
     setLuceneSearcher(indexRegistry.getIndexes());
   } catch (IOException e) {
     ioException = e; // Will be thrown later
   } finally {
     writeLock.unlock();
   }
 }