Java 类org.apache.lucene.index.ReaderManager 实例源码

项目:search    文件:DirectoryTaxonomyWriter.java   
/** Opens a {@link ReaderManager} from the internal {@link IndexWriter}. */
private void initReaderManager() throws IOException {
  if (!initializedReaderManager) {
    synchronized (this) {
      // verify that the taxo-writer hasn't been closed on us.
      ensureOpen();
      if (!initializedReaderManager) {
        readerManager = new ReaderManager(indexWriter, false);
        shouldRefreshReaderManager = false;
        initializedReaderManager = true;
      }
    }
  }
}
项目:perecoder    文件:LuceneIndexManagerTemplate.java   
@Override
public ReaderManager createReaderManager() {
    checkConfiguration();
    try {
        return new ReaderManager(directory);
    } catch (IOException ex) {
        throw new RuntimeException(ex.getMessage(), ex);
    }
}
项目:NYBC    文件:DirectoryTaxonomyWriter.java   
/** Opens a {@link ReaderManager} from the internal {@link IndexWriter}. */
private void initReaderManager() throws IOException {
  if (!initializedReaderManager) {
    synchronized (this) {
      // verify that the taxo-writer hasn't been closed on us.
      ensureOpen();
      if (!initializedReaderManager) {
        readerManager = new ReaderManager(indexWriter, false);
        shouldRefreshReaderManager = false;
        initializedReaderManager = true;
      }
    }
  }
}
项目:read-open-source-code    文件:DirectoryTaxonomyWriter.java   
/** Opens a {@link ReaderManager} from the internal {@link IndexWriter}. */
private void initReaderManager() throws IOException {
  if (!initializedReaderManager) {
    synchronized (this) {
      // verify that the taxo-writer hasn't been closed on us.
      ensureOpen();
      if (!initializedReaderManager) {
        readerManager = new ReaderManager(indexWriter, false);
        shouldRefreshReaderManager = false;
        initializedReaderManager = true;
      }
    }
  }
}
项目:read-open-source-code    文件:DirectoryTaxonomyWriter.java   
/** Opens a {@link ReaderManager} from the internal {@link IndexWriter}. */
private void initReaderManager() throws IOException {
  if (!initializedReaderManager) {
    synchronized (this) {
      // verify that the taxo-writer hasn't been closed on us.
      ensureOpen();
      if (!initializedReaderManager) {
        readerManager = new ReaderManager(indexWriter, false);
        shouldRefreshReaderManager = false;
        initializedReaderManager = true;
      }
    }
  }
}
项目:read-open-source-code    文件:DirectoryTaxonomyWriter.java   
/** Opens a {@link ReaderManager} from the internal {@link IndexWriter}. */
private void initReaderManager() throws IOException {
  if (!initializedReaderManager) {
    synchronized (this) {
      // verify that the taxo-writer hasn't been closed on us.
      ensureOpen();
      if (!initializedReaderManager) {
        readerManager = new ReaderManager(indexWriter, false);
        shouldRefreshReaderManager = false;
        initializedReaderManager = true;
      }
    }
  }
}
项目:Maskana-Gestor-de-Conocimiento    文件:DirectoryTaxonomyWriter.java   
/** Opens a {@link ReaderManager} from the internal {@link IndexWriter}. */
private void initReaderManager() throws IOException {
  if (!initializedReaderManager) {
    synchronized (this) {
      // verify that the taxo-writer hasn't been closed on us.
      ensureOpen();
      if (!initializedReaderManager) {
        readerManager = new ReaderManager(indexWriter, false);
        shouldRefreshReaderManager = false;
        initializedReaderManager = true;
      }
    }
  }
}
项目:t4f-data    文件:AosManagerTest.java   
@Test
public void testReaderManager() throws IOException {
    ReaderManager readerManager = new ReaderManager(AosIndexUtil.directory());
    IndexReader indexReader = null;
    try {
        indexReader = readerManager.acquire();
        IndexSearcher indexSearcher = new IndexSearcher(indexReader);
    }
    finally {
        if (indexReader == null) {
            readerManager.release(DirectoryReader.open(AosIndexUtil.directory()));
        }
    }
}
项目:taxonomy    文件:TrainingSetConfiguration.java   
@ConditionalOnProperty(prefix = "lucene.categoriser.", value = "useTSetBasedCategoriser")
   public @Bean ReaderManager trainingSetReaderManager() throws IOException {
return new ReaderManager(trainingSetDirectory());
   }