code: protected synchronized void indexSearcherOpen(String path) {
  
          IndexSearcher oldSearcher = null;
          Directory indexDirectory = null;
          try {
              indexDirectory = FSDirectory.open(Paths.get(path));
              if (DirectoryReader.indexExists(indexDirectory)) {
                  IndexReader reader = UninvertingReader.wrap(
                      DirectoryReader.open(indexDirectory),
                      createUninvertingMap());
                  if (m_indexSearcher != null) {
                      // store old searcher instance to close it later
                      oldSearcher = m_indexSearcher;
                  }
                  m_indexSearcher = new IndexSearcher(reader);
                  m_indexSearcher.setSimilarity(m_sim);
                  m_displayFilters = new HashMap<>();
              }
          } catch (IOException e) {
              LOG.error(Messages.get().getBundle().key(Messages.ERR_INDEX_SEARCHER_1, getName()), e);
              if (indexDirectory != null) {
                  try {
                      indexDirectory.close();
                  } catch (IOException closeException) {
                      // do nothing
                  }
              }
          }
          if (oldSearcher != null) {
              // close the old searcher if required
              indexSearcherClose(oldSearcher);
          }
      }
docs: Initializes the index searcher for this index.<p>
  
  In case there is an index searcher still open, it is closed first.<p>
  
  For performance reasons, one instance of the index searcher should be kept
  for all searches. However, if the index is updated or changed
  this searcher instance needs to be re-initialized.<p>
  
  @param path the path to the index directory