Interface IndexWriter.IndexReaderWarmer

  • All Known Implementing Classes:
    SimpleMergedSegmentWarmer
    Enclosing class:
    IndexWriter
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface IndexWriter.IndexReaderWarmer
    If DirectoryReader.open(IndexWriter) has been called (ie, this writer is in near real-time mode), then after a merge completes, this class can be invoked to warm the reader on the newly merged segment, before the merge commits. This is not required for near real-time search, but will reduce search latency on opening a new near real-time reader after a merge completes.
    • Method Detail

      • warm

        void warm​(LeafReader reader)
           throws java.io.IOException
        Invoked on the LeafReader for the newly merged segment, before that segment is made visible to near-real-time readers.
        Throws:
        java.io.IOException