Package org.apache.lucene.index
Class StandardDirectoryReaderOptimization
java.lang.Object
org.apache.lucene.index.StandardDirectoryReaderOptimization
An optimization to open the segment readers in parallel when opening a directory.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 fromDirectoryReader.open(org.apache.lucene.store.Directory)
methods.
-
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 fromDirectoryReader.open(org.apache.lucene.store.Directory)
methods.- Parameters:
directory
- the directory to opencommit
- the index changes to openleafSorter
- a comparator for sorting leaf readersexecutor
- executor to use to run in parallelparallelism
- number of readers to open in parallel- Returns:
- an open directory reader
- Throws:
IOException
- if there is a problem with the underlying implementation
-