Interface IncrementalIndexManager

  • All Known Implementing Classes:
    LuceneIncrementalIndexManager

    @LuceneIndependent
    @Internal
    public interface IncrementalIndexManager
    This manager is responsible for manipulating single Lucene directory and single index queue. All operations which are local to this index and don't depend on other indexes should live here.
    Since:
    7.9.0
    • Method Detail

      • isFlushing

        boolean isFlushing()
        Returns true if the index queue is currently being flushed.
        Returns:
        true if flushing, false otherwise.
      • flushQueue

        boolean flushQueue​(IndexManager.IndexQueueFlushMode flushMode)
        Flushes the index queue, processing a batch of the tasks
        Parameters:
        flushMode - - whether to flush the entire queue, or just one batch of batchsize as specified by the system property index.queue.batch.size
        Returns:
        whether the flush actually took place
      • flushQueue

        default boolean flushQueue()
        Flushes the index queue, processing all of the tasks.
        Returns:
        whether the flush actually took place
      • resetIndexQueue

        void resetIndexQueue()
        Resets the index queue removes all entries from the queue without processing them.
      • getLastNonEmptyFlushStats

        @Nullable FlushStatistics getLastNonEmptyFlushStats()
        Returns:
        the information about last queue flush. null if no flush has occured from system start.
      • getQueueSize

        int getQueueSize()
        Returns:
        the number of pending items in the corresponding index queue
        Since:
        7.9.0
      • refreshIndex

        default void refreshIndex()
                           throws IOException
        Refresh the index immediately, which publishes its most recent changes and makes them available for searching. This method is only applicable to the OpenSearch platform.
        Throws:
        IOException
      • getSizeInBytes

        long getSizeInBytes()
        Returns:
        size of the index in bytes
        Since:
        8.8.0