org.hibernate.search.indexes.impl

## Class NRTIndexManager

- java.lang.Object
- - org.hibernate.search.indexes.spi.DirectoryBasedIndexManager
  - - org.hibernate.search.indexes.impl.NRTIndexManager

- All Implemented Interfaces:
    IndexManager

      public class NRTIndexManager
      extends DirectoryBasedIndexManager

  IndexManager implementation taking advantage of the Near-Real-Time features of Lucene. When using this work mode the IndexWriter does not need a full flush at the end of each operation: new IndexReaders are able to inspect the unflushed changes still pending in the IndexWriter buffers. This improves write performance as the IndexWriter doesn't need to commit as often, but has two limitations:
  - unsaved index data might be lost in case of crashes
  - is not useful for non-local (clustered) backends
  Since:
    4.0
  Author:
    Sanne Grinovero (C) 2011 Red Hat Inc.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NRTIndexManager()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected DirectoryBasedReaderProvider` | `createIndexReader(String indexName, Properties cfg, WorkerBuildContext buildContext)`
    `protected WorkspaceHolder` | `createWorkspaceHolder(String indexName, Properties cfg, WorkerBuildContext buildContext)`

    - ### Methods inherited from class org.hibernate.search.indexes.spi.DirectoryBasedIndexManager

      `addContainedEntity, awaitAsyncProcessingCompletion, createDirectoryProvider, destroy, flushAndReleaseResources, getAnalyzer, getContainedTypes, getDirectoryModificationLock, getDirectoryProvider, getIndexBinding, getIndexingParameters, getIndexManagerType, getIndexName, getOptimizerStrategy, getReaderProvider, getSerializer, getSimilarity, getWorkspaceHolder, initialize, optimize, performOperations, performStreamOperation, setSearchFactory, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NRTIndexManager

          public NRTIndexManager()

  - ### Method Detail

    - #### createWorkspaceHolder

          protected WorkspaceHolder createWorkspaceHolder(String indexName,
                                                          Properties cfg,
                                                          WorkerBuildContext buildContext)

      Overrides:
        `createWorkspaceHolder` in class `DirectoryBasedIndexManager`

    - #### createIndexReader

          protected DirectoryBasedReaderProvider createIndexReader(String indexName,
                                                                   Properties cfg,
                                                                   WorkerBuildContext buildContext)

      Overrides:
        `createIndexReader` in class `DirectoryBasedIndexManager`

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved