code: private void closeAndKeepWaitingThreads(boolean completeClose)
     {
        if (!closed.get())
        {
           // cleanup resources obtained by filters
           if (completeClose && recoveryFilters != null)
           {
              for (AbstractRecoveryFilter filter : recoveryFilters)
              {
                 filter.close();
              }
              recoveryFilters.clear();
              recoveryFilters = null;
           }
  
           if (synonymProviderConfigFs != null)
           {
              try
              {
                 synonymProviderConfigFs.close();
              }
              catch (IOException e)
              {
                 log.warn("Exception while closing FileSystem", e);
              }
           }
           if (spellChecker != null)
           {
              spellChecker.close();
           }
           errorLog.close();
           indexRegister.getDefaultIndex().close();
           getContext().destroy();
           closed.set(true);
           log.info("Index closed: " + path);
           modeHandler.removeIndexerIoModeListener(this);
           if (indexInfos instanceof IndexerIoModeListener)
           {
              modeHandler.removeIndexerIoModeListener((IndexerIoModeListener)indexInfos);
           }
           if (indexUpdateMonitor instanceof IndexerIoModeListener)
           {
              modeHandler.removeIndexerIoModeListener((IndexerIoModeListener)indexUpdateMonitor);
           }
  
           unscheduleUpdateLoadBatchingThresholdTask();
        }
     }
docs: Closes this <code>QueryHandler</code> and frees resources attached to
  this handler.