Class StandardDirectoryReaderOptimization

java.lang.Object
org.apache.lucene.index.StandardDirectoryReaderOptimization

public class StandardDirectoryReaderOptimization extends Object
An optimization to open the segment readers in parallel when opening a directory.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.lucene.index.DirectoryReader
    open(org.apache.lucene.store.Directory directory, org.apache.lucene.index.IndexCommit commit, Comparator<org.apache.lucene.index.LeafReader> leafSorter, Executor executor, int parallelism)
    Called from DirectoryReader.open(org.apache.lucene.store.Directory) methods.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • open

      public static org.apache.lucene.index.DirectoryReader open(org.apache.lucene.store.Directory directory, org.apache.lucene.index.IndexCommit commit, Comparator<org.apache.lucene.index.LeafReader> leafSorter, Executor executor, int parallelism) throws IOException
      Called from DirectoryReader.open(org.apache.lucene.store.Directory) methods.
      Parameters:
      directory - the directory to open
      commit - the index changes to open
      leafSorter - a comparator for sorting leaf readers
      executor - executor to use to run in parallel
      parallelism - number of readers to open in parallel
      Returns:
      an open directory reader
      Throws:
      IOException - if there is a problem with the underlying implementation