@Override
 public void doClose() throws ElasticsearchException {
   if (scanContext != null) {
     scanContext.clear();
   }
   // clear and scope phase we  have
   Releasables.close(searcher, engineSearcher);
 }
Ejemplo n.º 2
0
 @Override
 public boolean release() throws ElasticSearchException {
   if (scanContext != null) {
     scanContext.clear();
   }
   // clear and scope phase we  have
   if (scopePhases != null) {
     for (ScopePhase scopePhase : scopePhases) {
       scopePhase.clear();
     }
   }
   // we should close this searcher, since its a new one we create each time, and we use the
   // IndexReader
   try {
     searcher.close();
   } catch (Exception e) {
     // ignore any exception here
   }
   engineSearcher.release();
   return true;
 }