public void initialize(Properties props, SearchFactoryImplementor searchFactoryImplementor) {
   this.searchFactoryImp = searchFactoryImplementor;
   this.sync = BatchedQueueingProcessor.isConfiguredAsSync(props);
   for (DirectoryProvider dp : searchFactoryImplementor.getDirectoryProviders()) {
     PerDPResources resources = new PerDPResources(searchFactoryImplementor, dp);
     resourcesMap.put(dp, resources);
   }
 }
 public void close() {
   IndexSearcherCloser.closeSearcher(searcher, searchFactory.getReaderProvider());
 }