Uses of Class
org.apache.lucene.store.Directory
Packages that use Directory
Package
Description
A Java implementation of Hunspell stemming and
spell-checking algorithms (
Hunspell
), and a stemming
TokenFilter (HunspellStemFilter
) based on it.Lucene 5.0 file format.
Lucene 5.0 compressing format.
Lucene 6.0 file format.
Components from the Lucene 7.0 index format.
Lucene 8.6 file format.
Lucene 8.7 file format.
Lucene 9.0 file format.
store helper
Utilities for evaluation, data preparation, etc.
Codecs API: API for customization of the encoding and structure of the index.
Lucene 9.0 file format.
Lucene 9.0 compressing format.
Lucene 9.4 file format.
Lucene 9.9 file format.
Simpletext Codec: writes human readable postings.
Taxonomy of Categories.
Taxonomy index implementation using on top of a Directory.
Code to maintain and access indices.
Miscellaneous Lucene utilities that don't really fit anywhere else.
Misc index tools and index support.
Misc Directory implementations.
Monitoring framework
Code to search indices.
Suggest alternate spellings for words.
Support for Autocomplete/Autosuggest
Analyzer based autosuggest.
Finite-state based autosuggest.
Ternary Search Tree based autosuggest.
Binary i/o API, used for all index data.
Some utility classes.
Block KD-tree, implementing the generic spatial data structure described in this paper.
-
Uses of Directory in org.apache.lucene.analysis.hunspell
Methods in org.apache.lucene.analysis.hunspell with parameters of type DirectoryModifier and TypeMethodDescriptionstatic SortingStrategy
An "offline" strategy that creates temporary files in the given directory and uses them for sorting withOfflineSorter
.Constructors in org.apache.lucene.analysis.hunspell with parameters of type DirectoryModifierConstructorDescriptionDictionary
(Directory tempDir, String tempFileNamePrefix, InputStream affix, InputStream dictionary) Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.Dictionary
(Directory tempDir, String tempFileNamePrefix, InputStream affix, List<InputStream> dictionaries, boolean ignoreCase) Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files. -
Uses of Directory in org.apache.lucene.backward_codecs.lucene50
Subclasses of Directory in org.apache.lucene.backward_codecs.lucene50Modifier and TypeClassDescription(package private) final class
Class for accessing a compound stream.Fields in org.apache.lucene.backward_codecs.lucene50 declared as DirectoryMethods in org.apache.lucene.backward_codecs.lucene50 with parameters of type DirectoryModifier and TypeMethodDescriptionfinal StoredFieldsReader
Lucene50StoredFieldsFormat.fieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) Lucene50StoredFieldsFormat.fieldsWriter
(Directory directory, SegmentInfo si, IOContext context) Lucene50CompoundFormat.getCompoundReader
(Directory dir, SegmentInfo si) private Map
<String, Lucene50CompoundReader.FileEntry> Lucene50CompoundReader.readEntries
(byte[] segmentID, Directory dir, String entriesFileName) Helper method that reads CFS entries from an input streamLucene50LiveDocsFormat.readLiveDocs
(Directory dir, SegmentCommitInfo info, IOContext context) void
Lucene50CompoundFormat.write
(Directory dir, SegmentInfo si, IOContext context) void
Lucene50LiveDocsFormat.writeLiveDocs
(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) Note: although this format is only used on older versions, we need to keep the write logic in addition to the read logic.Constructors in org.apache.lucene.backward_codecs.lucene50 with parameters of type DirectoryModifierConstructorDescriptionLucene50CompoundReader
(Directory directory, SegmentInfo si) Create a new CompoundFileDirectory. -
Uses of Directory in org.apache.lucene.backward_codecs.lucene50.compressing
Methods in org.apache.lucene.backward_codecs.lucene50.compressing with parameters of type DirectoryModifier and TypeMethodDescriptionLucene50CompressingStoredFieldsFormat.fieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) Lucene50CompressingStoredFieldsFormat.fieldsWriter
(Directory directory, SegmentInfo si, IOContext context) final TermVectorsReader
Lucene50CompressingTermVectorsFormat.vectorsReader
(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) Lucene50CompressingTermVectorsFormat.vectorsWriter
(Directory directory, SegmentInfo segmentInfo, IOContext context) Constructors in org.apache.lucene.backward_codecs.lucene50.compressing with parameters of type DirectoryModifierConstructorDescription(package private)
FieldsIndexReader
(Directory dir, String name, String suffix, String extension, String codecName, byte[] id, IndexInput metaIn) Lucene50CompressingStoredFieldsReader
(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) Sole constructor.Lucene50CompressingTermVectorsReader
(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) Sole constructor. -
Uses of Directory in org.apache.lucene.backward_codecs.lucene60
Methods in org.apache.lucene.backward_codecs.lucene60 with parameters of type DirectoryModifier and TypeMethodDescriptionLucene60FieldInfosFormat.read
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext context) void
Lucene60FieldInfosFormat.write
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context) Note: although this format is only used on older versions, we need to keep the write logic in addition to the read logic. -
Uses of Directory in org.apache.lucene.backward_codecs.lucene70
Methods in org.apache.lucene.backward_codecs.lucene70 with parameters of type DirectoryModifier and TypeMethodDescriptionprivate SegmentInfo
Lucene70SegmentInfoFormat.parseSegmentInfo
(Directory dir, DataInput input, String segment, byte[] segmentID) void
Lucene70SegmentInfoFormat.write
(Directory dir, SegmentInfo si, IOContext ioContext) -
Uses of Directory in org.apache.lucene.backward_codecs.lucene86
Methods in org.apache.lucene.backward_codecs.lucene86 with parameters of type DirectoryModifier and TypeMethodDescriptionprivate SegmentInfo
Lucene86SegmentInfoFormat.parseSegmentInfo
(Directory dir, DataInput input, String segment, byte[] segmentID) void
Lucene86SegmentInfoFormat.write
(Directory dir, SegmentInfo si, IOContext ioContext) -
Uses of Directory in org.apache.lucene.backward_codecs.lucene87
Methods in org.apache.lucene.backward_codecs.lucene87 with parameters of type DirectoryModifier and TypeMethodDescriptionLucene87StoredFieldsFormat.fieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) Lucene87StoredFieldsFormat.fieldsWriter
(Directory directory, SegmentInfo si, IOContext context) -
Uses of Directory in org.apache.lucene.backward_codecs.lucene90
Methods in org.apache.lucene.backward_codecs.lucene90 with parameters of type DirectoryModifier and TypeMethodDescriptionprivate SegmentInfo
Lucene90SegmentInfoFormat.parseSegmentInfo
(Directory dir, DataInput input, String segment, byte[] segmentID) Lucene90FieldInfosFormat.read
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext context) void
Lucene90FieldInfosFormat.write
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context) void
Lucene90SegmentInfoFormat.write
(Directory dir, SegmentInfo si, IOContext ioContext) -
Uses of Directory in org.apache.lucene.backward_codecs.store
Methods in org.apache.lucene.backward_codecs.store with parameters of type DirectoryModifier and TypeMethodDescriptionstatic IndexOutput
EndiannessReverserUtil.createOutput
(Directory directory, String name, IOContext context) Open an index outputstatic IndexOutput
EndiannessReverserUtil.createTempOutput
(Directory directory, String prefix, String suffix, IOContext context) Open a temp index outputstatic ChecksumIndexInput
EndiannessReverserUtil.openChecksumInput
(Directory directory, String name, IOContext context) Open a checksum index inputstatic IndexInput
Open an index input -
Uses of Directory in org.apache.lucene.classification.utils
Methods in org.apache.lucene.classification.utils with parameters of type DirectoryModifier and TypeMethodDescriptionvoid
DatasetSplitter.split
(IndexReader originalIndex, Directory trainingIndex, Directory testIndex, Directory crossValidationIndex, Analyzer analyzer, boolean termVectors, String classFieldName, String... fieldNames) Split a given index into 3 indexes for training, test and cross validation tasks respectively -
Uses of Directory in org.apache.lucene.codecs
Subclasses of Directory in org.apache.lucene.codecsModifier and TypeClassDescriptionclass
A read-onlyDirectory
that consists of a view over a compound file.Methods in org.apache.lucene.codecs with parameters of type DirectoryModifier and TypeMethodDescriptionabstract StoredFieldsReader
StoredFieldsFormat.fieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) Returns aStoredFieldsReader
to load stored fields.abstract StoredFieldsWriter
StoredFieldsFormat.fieldsWriter
(Directory directory, SegmentInfo si, IOContext context) Returns aStoredFieldsWriter
to write stored fields.abstract CompoundDirectory
CompoundFormat.getCompoundReader
(Directory dir, SegmentInfo si) Returns a Directory view (read-only) for the compound files in this segmentabstract FieldInfos
FieldInfosFormat.read
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext iocontext) abstract SegmentInfo
SegmentInfoFormat.read
(Directory directory, String segmentName, byte[] segmentID, IOContext context) ReadSegmentInfo
data from a directory.abstract Bits
LiveDocsFormat.readLiveDocs
(Directory dir, SegmentCommitInfo info, IOContext context) Read live docs bits.abstract TermVectorsReader
TermVectorsFormat.vectorsReader
(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) Returns aTermVectorsReader
to read term vectors.abstract TermVectorsWriter
TermVectorsFormat.vectorsWriter
(Directory directory, SegmentInfo segmentInfo, IOContext context) Returns aTermVectorsWriter
to write term vectors.abstract void
CompoundFormat.write
(Directory dir, SegmentInfo si, IOContext context) Packs the provided segment's files into a compound format.abstract void
FieldInfosFormat.write
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context) Writes the providedFieldInfos
to the directory.abstract void
SegmentInfoFormat.write
(Directory dir, SegmentInfo info, IOContext ioContext) WriteSegmentInfo
data.abstract void
LiveDocsFormat.writeLiveDocs
(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) Persist live docs bits. -
Uses of Directory in org.apache.lucene.codecs.lucene90
Subclasses of Directory in org.apache.lucene.codecs.lucene90Modifier and TypeClassDescription(package private) final class
Class for accessing a compound stream.Fields in org.apache.lucene.codecs.lucene90 declared as DirectoryMethods in org.apache.lucene.codecs.lucene90 with parameters of type DirectoryModifier and TypeMethodDescriptionLucene90StoredFieldsFormat.fieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) Lucene90StoredFieldsFormat.fieldsWriter
(Directory directory, SegmentInfo si, IOContext context) Lucene90CompoundFormat.getCompoundReader
(Directory dir, SegmentInfo si) private Map
<String, Lucene90CompoundReader.FileEntry> Lucene90CompoundReader.readEntries
(byte[] segmentID, Directory dir, String entriesFileName) Helper method that reads CFS entries from an input streamLucene90LiveDocsFormat.readLiveDocs
(Directory dir, SegmentCommitInfo info, IOContext context) void
Lucene90CompoundFormat.write
(Directory dir, SegmentInfo si, IOContext context) private void
Lucene90CompoundFormat.writeCompoundFile
(IndexOutput entries, IndexOutput data, Directory dir, SegmentInfo si) void
Lucene90LiveDocsFormat.writeLiveDocs
(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) Constructors in org.apache.lucene.codecs.lucene90 with parameters of type DirectoryModifierConstructorDescriptionLucene90CompoundReader
(Directory directory, SegmentInfo si) Create a new CompoundFileDirectory. -
Uses of Directory in org.apache.lucene.codecs.lucene90.compressing
Fields in org.apache.lucene.codecs.lucene90.compressing declared as DirectoryMethods in org.apache.lucene.codecs.lucene90.compressing with parameters of type DirectoryModifier and TypeMethodDescriptionLucene90CompressingStoredFieldsFormat.fieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) Lucene90CompressingStoredFieldsFormat.fieldsWriter
(Directory directory, SegmentInfo si, IOContext context) final TermVectorsReader
Lucene90CompressingTermVectorsFormat.vectorsReader
(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) final TermVectorsWriter
Lucene90CompressingTermVectorsFormat.vectorsWriter
(Directory directory, SegmentInfo segmentInfo, IOContext context) Constructors in org.apache.lucene.codecs.lucene90.compressing with parameters of type DirectoryModifierConstructorDescription(package private)
FieldsIndexReader
(Directory dir, String name, String suffix, String extension, String codecName, byte[] id, IndexInput metaIn, IOContext context) (package private)
FieldsIndexWriter
(Directory dir, String name, String suffix, String extension, String codecName, byte[] id, int blockShift, IOContext ioContext) Lucene90CompressingStoredFieldsReader
(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) Sole constructor.(package private)
Lucene90CompressingStoredFieldsWriter
(Directory directory, SegmentInfo si, String segmentSuffix, IOContext context, String formatName, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk, int blockShift) Sole constructor.Lucene90CompressingTermVectorsReader
(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) Sole constructor.(package private)
Lucene90CompressingTermVectorsWriter
(Directory directory, SegmentInfo si, String segmentSuffix, IOContext context, String formatName, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk, int blockShift) Sole constructor. -
Uses of Directory in org.apache.lucene.codecs.lucene94
Methods in org.apache.lucene.codecs.lucene94 with parameters of type DirectoryModifier and TypeMethodDescriptionLucene94FieldInfosFormat.read
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext context) void
Lucene94FieldInfosFormat.write
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context) -
Uses of Directory in org.apache.lucene.codecs.lucene99
Methods in org.apache.lucene.codecs.lucene99 with parameters of type DirectoryModifier and TypeMethodDescriptionprivate SegmentInfo
Lucene99SegmentInfoFormat.parseSegmentInfo
(Directory dir, DataInput input, String segment, byte[] segmentID) void
Lucene99SegmentInfoFormat.write
(Directory dir, SegmentInfo si, IOContext ioContext) -
Uses of Directory in org.apache.lucene.codecs.simpletext
Methods in org.apache.lucene.codecs.simpletext with parameters of type DirectoryModifier and TypeMethodDescriptionSimpleTextStoredFieldsFormat.fieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) SimpleTextStoredFieldsFormat.fieldsWriter
(Directory directory, SegmentInfo si, IOContext context) SimpleTextCompoundFormat.getCompoundReader
(Directory dir, SegmentInfo si) SimpleTextFieldInfosFormat.read
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext iocontext) SimpleTextSegmentInfoFormat.read
(Directory directory, String segmentName, byte[] segmentID, IOContext context) SimpleTextLiveDocsFormat.readLiveDocs
(Directory dir, SegmentCommitInfo info, IOContext context) SimpleTextTermVectorsFormat.vectorsReader
(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) SimpleTextTermVectorsFormat.vectorsWriter
(Directory directory, SegmentInfo segmentInfo, IOContext context) void
SimpleTextCompoundFormat.write
(Directory dir, SegmentInfo si, IOContext context) void
SimpleTextFieldInfosFormat.write
(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context) void
SimpleTextSegmentInfoFormat.write
(Directory dir, SegmentInfo si, IOContext ioContext) void
SimpleTextLiveDocsFormat.writeLiveDocs
(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) Constructors in org.apache.lucene.codecs.simpletext with parameters of type DirectoryModifierConstructorDescriptionSimpleTextBKDWriter
(int maxDoc, Directory tempDir, String tempFileNamePrefix, BKDConfig config, double maxMBSortInHeap, long totalPointCount) SimpleTextStoredFieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) SimpleTextStoredFieldsWriter
(Directory directory, String segment, IOContext context) SimpleTextTermVectorsReader
(Directory directory, SegmentInfo si, IOContext context) SimpleTextTermVectorsWriter
(Directory directory, String segment, IOContext context) -
Uses of Directory in org.apache.lucene.facet.taxonomy
Methods in org.apache.lucene.facet.taxonomy with parameters of type DirectoryModifier and TypeMethodDescriptionstatic void
TaxonomyMergeUtils.merge
(Directory srcIndexDir, Directory srcTaxoDir, DirectoryTaxonomyWriter.OrdinalMap map, IndexWriter destIndexWriter, DirectoryTaxonomyWriter destTaxoWriter, FacetsConfig srcConfig) Merges the given taxonomy and index directories and commits the changes to the given writers.Constructors in org.apache.lucene.facet.taxonomy with parameters of type DirectoryModifierConstructorDescriptionSearcherTaxonomyManager
(Directory indexDir, Directory taxoDir, SearcherFactory searcherFactory) Creates search and taxonomy readers over the corresponding directories. -
Uses of Directory in org.apache.lucene.facet.taxonomy.directory
Fields in org.apache.lucene.facet.taxonomy.directory declared as DirectoryMethods in org.apache.lucene.facet.taxonomy.directory that return DirectoryModifier and TypeMethodDescriptionDirectoryTaxonomyWriter.getDirectory()
Returns theDirectory
of this taxonomy writer.Methods in org.apache.lucene.facet.taxonomy.directory with parameters of type DirectoryModifier and TypeMethodDescriptionvoid
DirectoryTaxonomyWriter.addTaxonomy
(Directory taxoDir, DirectoryTaxonomyWriter.OrdinalMap map) Takes the categories from the given taxonomy directory, and adds the missing ones to this taxonomy.protected DirectoryReader
DirectoryTaxonomyReader.openIndexReader
(Directory directory) Open theDirectoryReader
from thisDirectory
.protected IndexWriter
DirectoryTaxonomyWriter.openIndexWriter
(Directory directory, IndexWriterConfig config) Open internal index writer, which contains the taxonomy data.private List
<FacetLabel> ReindexingEnrichedDirectoryTaxonomyWriter.recordPathsInOrder
(Directory d) Make a list of all labels in the taxonomy.void
DirectoryTaxonomyWriter.replaceTaxonomy
(Directory taxoDir) Replaces the current taxonomy with the given one.Constructors in org.apache.lucene.facet.taxonomy.directory with parameters of type DirectoryModifierConstructorDescriptionDirectoryTaxonomyReader
(Directory directory) Open for reading a taxonomy stored in a givenDirectory
.Create this withOpenMode.CREATE_OR_APPEND
.DirectoryTaxonomyWriter
(Directory directory, IndexWriterConfig.OpenMode openMode) Creates a new instance with a default cache as defined byDirectoryTaxonomyWriter.defaultTaxonomyWriterCache()
.DirectoryTaxonomyWriter
(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache) Construct a Taxonomy writer.ReindexingEnrichedDirectoryTaxonomyWriter
(Directory d, BiConsumer<FacetLabel, Document> ordinalDataAppender) Create a taxonomy writer that will allow editing the ordinal docs before indexing them. -
Uses of Directory in org.apache.lucene.index
Subclasses of Directory in org.apache.lucene.indexFields in org.apache.lucene.index declared as DirectoryModifier and TypeFieldDescriptionprivate final Directory
CheckIndex.dir
CheckIndex.Status.dir
Directory index is in.private final Directory
IndexUpgrader.dir
private final Directory
PersistentSnapshotDeletionPolicy.dir
final Directory
SegmentInfo.dir
Where this segment resides.(package private) Directory
StandardDirectoryReader.ReaderCommit.dir
protected final Directory
DirectoryReader.directory
The index directory.private final Directory
IndexFileDeleter.directory
private final Directory
IndexWriter.directory
private final Directory
ReaderPool.directory
(package private) final Directory
SegmentInfos.FindSegmentsFile.directory
private final Directory
SegmentMerger.directory
final Directory
SegmentReadState.directory
Directory
where this segment is read from.final Directory
SegmentWriteState.directory
Directory
where this segment will be written to.(package private) final Directory
StoredFieldsConsumer.directory
protected final Directory
TermVectorsConsumer.directory
private final Directory
VectorValuesConsumer.directory
(package private) Directory
IndexFileDeleter.CommitPoint.directoryOrig
private final Directory
IndexFileDeleter.directoryOrig
private final Directory
IndexWriter.directoryOrig
private final Directory
ReaderPool.originalDirectory
Methods in org.apache.lucene.index that return DirectoryModifier and TypeMethodDescriptionfinal Directory
DirectoryReader.directory()
Returns the directory this index resides in.SegmentReader.directory()
Returns the directory this index resides in.abstract Directory
IndexCommit.getDirectory()
Returns theDirectory
for the index.IndexFileDeleter.CommitPoint.getDirectory()
IndexWriter.getDirectory()
Returns the Directory used by this index.SnapshotDeletionPolicy.SnapshotCommitPoint.getDirectory()
StandardDirectoryReader.ReaderCommit.getDirectory()
ConcurrentMergeScheduler.wrapForMerge
(MergePolicy.OneMerge merge, Directory in) MergeScheduler.wrapForMerge
(MergePolicy.OneMerge merge, Directory in) Wraps the incomingDirectory
so that we can merge-throttle it usingRateLimitedIndexOutput
.NoMergeScheduler.wrapForMerge
(MergePolicy.OneMerge merge, Directory in) Methods in org.apache.lucene.index with parameters of type DirectoryModifier and TypeMethodDescriptionIndexWriter.acquireWriteLocks
(Directory... dirs) Acquires write locks on all the directories; be sure to match with a call toIOUtils.close(java.io.Closeable...)
in a finally clause.long
IndexWriter.addIndexes
(Directory... dirs) Adds all segments from an array of indexes into this index.final void
Writes and syncs to the Directory dir, taking care to remove the segments file on exception(package private) final String
SegmentInfos.finishCommit
(Directory dir) Returns the committed segments_N filename.(package private) DocValuesProducer
SegmentDocValues.getDocValuesProducer
(long gen, SegmentCommitInfo si, Directory dir, FieldInfos infos) Returns theDocValuesProducer
for the given generation.static long
SegmentInfos.getLastCommitGeneration
(Directory directory) Get the generation of the most recent commit to the index in this directory (N in the segments_N file).static String
SegmentInfos.getLastCommitSegmentsFileName
(Directory directory) Get the filename of the segments_N file for the most recent commit to the index in this Directory.private void
ReadersAndUpdates.handleDVUpdates
(FieldInfos infos, Directory dir, DocValuesFormat dvFormat, SegmentReader reader, Map<Integer, Set<String>> fieldFiles, long maxDelGen, InfoStream infoStream) static boolean
DirectoryReader.indexExists
(Directory directory) Returnstrue
if an index likely exists at the specified directory.private void
ConcurrentMergeScheduler.initDynamicDefaults
(Directory directory) (package private) void
ConcurrentMergeScheduler.initialize
(InfoStream infoStream, Directory directory) (package private) void
MergeScheduler.initialize
(InfoStream infoStream, Directory directory) IndexWriter calls this on init.static List
<IndexCommit> DirectoryReader.listCommits
(Directory dir) Returns all commit points that exist in the Directory.private RefCount
<DocValuesProducer> SegmentDocValues.newDocValuesProducer
(SegmentCommitInfo si, Directory dir, long gen, FieldInfos infos) private void
static DirectoryReader
Returns a IndexReader reading the index in the given Directorystatic DirectoryReader
DirectoryReader.open
(Directory directory, Comparator<LeafReader> leafSorter) Returns a IndexReader for the index in the given Directory(package private) static DirectoryReader
StandardDirectoryReader.open
(Directory directory, int minSupportedMajorVersion, IndexCommit commit, Comparator<LeafReader> leafSorter) called from DirectoryReader.open(...) methods(package private) static DirectoryReader
StandardDirectoryReader.open
(Directory directory, IndexCommit commit, Comparator<LeafReader> leafSorter) static DirectoryReader
StandardDirectoryReader.open
(Directory directory, SegmentInfos infos, List<? extends LeafReader> oldReaders, Comparator<LeafReader> leafSorter) This constructor is only used forStandardDirectoryReader.doOpenIfChanged(SegmentInfos)
, as well as NRT replication.private static void
SegmentInfos.parseSegmentInfos
(Directory directory, DataInput input, SegmentInfos infos, int format) (package private) final void
SegmentInfos.prepareCommit
(Directory dir) Call this to start a commit.static final SegmentInfos
SegmentInfos.readCommit
(Directory directory, String segmentFileName) Read a particular segmentFileName.static final SegmentInfos
SegmentInfos.readCommit
(Directory directory, String segmentFileName, int minSupportedMajorVersion) Read a particular segmentFileName, as long as the commit'sSegmentInfos.getIndexCreatedVersionMajor()
is strictly greater than the provided minimum supported major version.static final SegmentInfos
SegmentInfos.readCommit
(Directory directory, ChecksumIndexInput input, long generation) Read the commit from the providedChecksumIndexInput
.static final SegmentInfos
SegmentInfos.readCommit
(Directory directory, ChecksumIndexInput input, long generation, int minSupportedMajorVersion) Read the commit from the providedChecksumIndexInput
.static final SegmentInfos
SegmentInfos.readLatestCommit
(Directory directory) Find the latest commit (segments_N file
) and load allSegmentCommitInfo
s.static final SegmentInfos
SegmentInfos.readLatestCommit
(Directory directory, int minSupportedMajorVersion) Find the latest commit (segments_N file
) and load allSegmentCommitInfo
s, as long as the commit'sSegmentInfos.getIndexCreatedVersionMajor()
is strictly greater than the provided minimum supported major version.MergePolicy.OneMerge.reorder
(CodecReader reader, Directory dir, Executor executor) Extend this method if you wish to renumber doc IDs.(package private) final void
SegmentInfos.rollbackCommit
(Directory dir) Returns a description of the merges in this specification.ConcurrentMergeScheduler.wrapForMerge
(MergePolicy.OneMerge merge, Directory in) MergeScheduler.wrapForMerge
(MergePolicy.OneMerge merge, Directory in) Wraps the incomingDirectory
so that we can merge-throttle it usingRateLimitedIndexOutput
.NoMergeScheduler.wrapForMerge
(MergePolicy.OneMerge merge, Directory in) private void
ReadersAndUpdates.writeFieldInfosGen
(FieldInfos fieldInfos, Directory dir, FieldInfosFormat infosFormat) boolean
ReadersAndUpdates.writeFieldUpdates
(Directory dir, FieldInfos.FieldNumbers fieldNumbers, long maxDelGen, InfoStream infoStream) (package private) boolean
PendingDeletes.writeLiveDocs
(Directory dir) Writes the live docs to disk and returnstrue
if any new docs were written.(package private) boolean
PendingSoftDeletes.writeLiveDocs
(Directory dir) boolean
ReadersAndUpdates.writeLiveDocs
(Directory dir) Constructors in org.apache.lucene.index with parameters of type DirectoryModifierConstructorDescriptionCheckIndex
(Directory dir) Create a new CheckIndex on the directory.CheckIndex
(Directory dir, Lock writeLock) Expert: create a directory with the specified lock.CommitPoint
(Collection<IndexFileDeleter.CommitPoint> commitsToDelete, Directory directoryOrig, SegmentInfos segmentInfos) protected
DirectoryReader
(Directory directory, LeafReader[] segmentReaders, Comparator<LeafReader> leafSorter) Expert: Constructs aDirectoryReader
on the given subReaders.(package private)
DocumentsWriter
(DocumentsWriter.FlushNotifications flushNotifications, int indexCreatedVersionMajor, AtomicLong pendingNumDocs, boolean enableTestPoints, Supplier<String> segmentNameSupplier, LiveIndexWriterConfig config, Directory directoryOrig, Directory directory, FieldInfos.FieldNumbers globalFieldNumberMap) (package private)
DocumentsWriterPerThread
(int indexMajorVersionCreated, String segmentName, Directory directoryOrig, Directory directory, LiveIndexWriterConfig indexWriterConfig, DocumentsWriterDeleteQueue deleteQueue, FieldInfos.Builder fieldInfos, AtomicLong pendingNumDocs, boolean enableTestPoints) protected
FindSegmentsFile
(Directory directory) Sole constructor.IndexFileDeleter
(String[] files, Directory directoryOrig, Directory directory, IndexDeletionPolicy policy, SegmentInfos segmentInfos, InfoStream infoStream, IndexWriter writer, boolean initialIndexExists, boolean isReaderInit) Initialize the deleter: find all previous commits in the Directory, incref the files they reference, call the policy to let it delete commits.(package private)
IndexingChain
(int indexCreatedVersionMajor, SegmentInfo segmentInfo, Directory directory, FieldInfos.Builder fieldInfos, LiveIndexWriterConfig indexWriterConfig, Consumer<Throwable> abortingExceptionConsumer) IndexUpgrader
(Directory dir) Creates index upgrader on the given directory, using anIndexWriter
using the givenmatchVersion
.IndexUpgrader
(Directory dir, IndexWriterConfig iwc, boolean deletePriorCommits) Creates index upgrader on the given directory, using anIndexWriter
using the given config.IndexUpgrader
(Directory dir, InfoStream infoStream, boolean deletePriorCommits) Creates index upgrader on the given directory, using anIndexWriter
using the givenmatchVersion
.IndexWriter
(Directory d, IndexWriterConfig conf) Constructs a new IndexWriter per the settings given inconf
.PersistentSnapshotDeletionPolicy
(IndexDeletionPolicy primary, Directory dir) PersistentSnapshotDeletionPolicy
wraps anotherIndexDeletionPolicy
to enable flexible snapshotting, passingIndexWriterConfig.OpenMode.CREATE_OR_APPEND
by default.PersistentSnapshotDeletionPolicy
(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode) PersistentSnapshotDeletionPolicy
wraps anotherIndexDeletionPolicy
to enable flexible snapshotting.(package private)
ReaderCommit
(StandardDirectoryReader reader, SegmentInfos infos, Directory dir) ReaderManager
(Directory dir) Creates and returns a new ReaderManager from the givenDirectory
.(package private)
ReaderPool
(Directory directory, Directory originalDirectory, SegmentInfos segmentInfos, FieldInfos.FieldNumbers fieldNumbers, LongSupplier completedDelGenSupplier, InfoStream infoStream, String softDeletesField, StandardDirectoryReader reader) (package private)
SegmentCoreReaders
(Directory dir, SegmentCommitInfo si, IOContext context) (package private)
SegmentDocValuesProducer
(SegmentCommitInfo si, Directory dir, FieldInfos coreInfos, FieldInfos allInfos, SegmentDocValues segDocValues) Creates a new producer that handles updated docvalues fieldsSegmentInfo
(Directory dir, Version version, Version minVersion, String name, int maxDoc, boolean isCompoundFile, boolean hasBlocks, Codec codec, Map<String, String> diagnostics, byte[] id, Map<String, String> attributes, Sort indexSort) Construct a new complete SegmentInfo instance from input.(package private)
SegmentMerger
(List<CodecReader> readers, SegmentInfo segmentInfo, InfoStream infoStream, Directory dir, FieldInfos.FieldNumbers fieldNumbers, IOContext context, Executor intraMergeTaskExecutor) SegmentReadState
(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context) Create aSegmentReadState
.SegmentReadState
(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, String segmentSuffix) Create aSegmentReadState
.SegmentWriteState
(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, BufferedUpdates segUpdates, IOContext context) Sole constructor.SegmentWriteState
(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, BufferedUpdates segUpdates, IOContext context, String segmentSuffix) Constructor which takes segment suffix.(package private)
SortingStoredFieldsConsumer
(Codec codec, Directory directory, SegmentInfo info) (package private)
SortingTermVectorsConsumer
(IntBlockPool.Allocator intBlockAllocator, ByteBlockPool.Allocator byteBlockAllocator, Directory directory, SegmentInfo info, Codec codec) (package private)
StandardDirectoryReader
(Directory directory, LeafReader[] readers, IndexWriter writer, SegmentInfos sis, Comparator<LeafReader> leafSorter, boolean applyAllDeletes, boolean writeAllDeletes) package private constructor, called only from static open() methods.(package private)
StoredFieldsConsumer
(Codec codec, Directory directory, SegmentInfo info) (package private)
TermVectorsConsumer
(IntBlockPool.Allocator intBlockAllocator, ByteBlockPool.Allocator byteBlockAllocator, Directory directory, SegmentInfo info, Codec codec) (package private)
(package private)
VectorValuesConsumer
(Codec codec, Directory directory, SegmentInfo segmentInfo, InfoStream infoStream) -
Uses of Directory in org.apache.lucene.misc
Methods in org.apache.lucene.misc with parameters of type Directory -
Uses of Directory in org.apache.lucene.misc.index
Fields in org.apache.lucene.misc.index declared as DirectoryModifier and TypeFieldDescriptionprivate final Directory
PKIndexSplitter.dir1
private final Directory
PKIndexSplitter.dir2
private final Directory
BPIndexReorderer.ForwardIndexSorter.directory
protected final Directory
IndexRearranger.input
private final Directory
PKIndexSplitter.input
protected final Directory
IndexRearranger.output
Methods in org.apache.lucene.misc.index with parameters of type DirectoryModifier and TypeMethodDescriptionprivate BPIndexReorderer.ForwardIndex
BPIndexReorderer.buildForwardIndex
(Directory tempDir, String postingsFileName, int maxDoc, int maxTerm) BPIndexReorderer.computeDocMap
(CodecReader reader, Directory tempDir, Executor executor) Expert: Compute theSorter.DocMap
that holds the new doc ID numbering.private int[]
BPIndexReorderer.computePermutation
(CodecReader reader, Set<String> fields, Directory dir, TaskExecutor executor) Compute a permutation of the doc ID space that reduces log gaps between consecutive postings.BinaryDocValueSelector.createDeleteSelectorFromIndex
(String field, Directory directory) Create a selector for the deletes in an index, which can then be applied to a rearranged indexprivate void
PKIndexSplitter.createIndex
(IndexWriterConfig config, Directory target, DirectoryReader reader, Query preserveFilter, boolean negateFilter) static List
<IndexRearranger.DocumentSelector> BinaryDocValueSelector.createLiveSelectorsFromIndex
(String field, Directory directory) Create a list of selectors that will reproduce the index geometry when used withIndexRearranger
private static void
IndexRearranger.finalizeRearrange
(Directory output, List<IndexRearranger.DocumentSelector> segmentSelectors) Place segments in the order of their respective selectors and ensure the rearrange was performed correctly.BPIndexReorderer.reorder
(CodecReader reader, Directory tempDir, Executor executor) Reorder the givenCodecReader
into a reader that tries to minimize the log gap between consecutive documents in postings, which usually helps improve space efficiency and query evaluation efficiency.void
MultiPassIndexSplitter.split
(IndexReader in, Directory[] outputs, boolean seq) Split source index into multiple parts.private int
BPIndexReorderer.writePostings
(CodecReader reader, Set<String> fields, Directory tempDir, DataOutput postingsOut, int parallelism) Constructors in org.apache.lucene.misc.index with parameters of type DirectoryModifierConstructorDescription(package private)
ForwardIndexSorter
(Directory directory) IndexRearranger
(Directory input, Directory output, IndexWriterConfig config, List<IndexRearranger.DocumentSelector> segmentSelectors) Constructor with no deletes to applyIndexRearranger
(Directory input, Directory output, IndexWriterConfig config, List<IndexRearranger.DocumentSelector> segmentSelectors, IndexRearranger.DocumentSelector deletedDocsSelector) All args constructorPKIndexSplitter
(Directory input, Directory dir1, Directory dir2, Term midTerm) Split an index based on a given primary key term and a 'middle' term.PKIndexSplitter
(Directory input, Directory dir1, Directory dir2, Term midTerm, IndexWriterConfig config1, IndexWriterConfig config2) PKIndexSplitter
(Directory input, Directory dir1, Directory dir2, Query docsInFirstIndex) Split an index based on aQuery
.PKIndexSplitter
(Directory input, Directory dir1, Directory dir2, Query docsInFirstIndex, IndexWriterConfig config1, IndexWriterConfig config2) -
Uses of Directory in org.apache.lucene.misc.store
Subclasses of Directory in org.apache.lucene.misc.storeModifier and TypeClassDescriptionfinal class
FilterDirectory
that tracks write amplification factorclass
ADirectory
implementation for all Unixes and Windows that uses DIRECT I/O to bypass OS level IO caching during merging.final class
This directory wrapper overridescopyFrom(Directory, String, String, IOContext)
in order to optionally use a hard-link instead of a full byte by byte file copy if applicable.class
A straightforward implementation ofFSDirectory
using java.io.RandomAccessFile.Methods in org.apache.lucene.misc.store with parameters of type DirectoryModifier and TypeMethodDescriptionvoid
HardlinkCopyDirectoryWrapper.copyFrom
(Directory from, String srcFile, String destFile, IOContext context) Constructors in org.apache.lucene.misc.store with parameters of type DirectoryModifierConstructorDescriptionByteWritesTrackingDirectoryWrapper
(Directory in, boolean trackTempOutput) Constructor with option to track tempOutputCreates a new HardlinkCopyDirectoryWrapper delegating to the given directory -
Uses of Directory in org.apache.lucene.monitor
Fields in org.apache.lucene.monitor declared as DirectoryModifier and TypeFieldDescriptionprivate final Directory
DocumentBatch.MultiDocumentBatch.directory
Fields in org.apache.lucene.monitor with type parameters of type DirectoryModifier and TypeFieldDescriptionprivate IOSupplier
<Directory> MonitorConfiguration.directoryProvider
Methods in org.apache.lucene.monitor that return types with arguments of type DirectoryMethod parameters in org.apache.lucene.monitor with type arguments of type DirectoryModifier and TypeMethodDescriptionMonitorConfiguration.setDirectoryProvider
(IOSupplier<Directory> directoryProvider, MonitorQuerySerializer serializer) MonitorConfiguration.setDirectoryProvider
(IOSupplier<Directory> directoryProvider, MonitorQuerySerializer serializer, Boolean readOnly) Sets a custom directory, with a custom serializer. -
Uses of Directory in org.apache.lucene.search
Constructors in org.apache.lucene.search with parameters of type DirectoryModifierConstructorDescriptionSearcherManager
(Directory dir, SearcherFactory searcherFactory) Creates and returns a new SearcherManager from the givenDirectory
. -
Uses of Directory in org.apache.lucene.search.spell
Fields in org.apache.lucene.search.spell declared as DirectoryModifier and TypeFieldDescription(package private) Directory
SpellChecker.spellIndex
the spell indexMethods in org.apache.lucene.search.spell with parameters of type DirectoryModifier and TypeMethodDescription(package private) IndexSearcher
SpellChecker.createSearcher
(Directory dir) Creates a new read-only IndexSearchervoid
SpellChecker.setSpellIndex
(Directory spellIndexDir) Use a different index as the spell checker index or re-open the existing index ifspellIndex
is the same value as given in the constructor.private void
SpellChecker.swapSearcher
(Directory dir) Constructors in org.apache.lucene.search.spell with parameters of type DirectoryModifierConstructorDescriptionSpellChecker
(Directory spellIndex) Use the given directory as a spell checker index with aLevenshteinDistance
as the defaultStringDistance
.SpellChecker
(Directory spellIndex, StringDistance sd) Use the given directory as a spell checker index.SpellChecker
(Directory spellIndex, StringDistance sd, Comparator<SuggestWord> comparator) Use the given directory as a spell checker index with the givenStringDistance
measure and the givenComparator
for sorting the results. -
Uses of Directory in org.apache.lucene.search.suggest
Fields in org.apache.lucene.search.suggest declared as DirectoryConstructors in org.apache.lucene.search.suggest with parameters of type DirectoryModifierConstructorDescriptionSortedInputIterator
(Directory tempDir, String tempFileNamePrefix, InputIterator source) Creates a new sorted wrapper, using natural order for sorting.SortedInputIterator
(Directory tempDir, String tempFileNamePrefix, InputIterator source, Comparator<BytesRef> comparator) Creates a new sorted wrapper, sorting by BytesRef (ascending) then cost (ascending). -
Uses of Directory in org.apache.lucene.search.suggest.analyzing
Fields in org.apache.lucene.search.suggest.analyzing declared as DirectoryModifier and TypeFieldDescriptionprivate final Directory
AnalyzingInfixSuggester.dir
private final Directory
AnalyzingSuggester.tempDir
Methods in org.apache.lucene.search.suggest.analyzing that return DirectoryModifier and TypeMethodDescriptionprotected Directory
AnalyzingInfixSuggester.getDirectory
(Path path) Subclass can override to choose a specificDirectory
implementation.Constructors in org.apache.lucene.search.suggest.analyzing with parameters of type DirectoryModifierConstructorDescriptionAnalyzingInfixSuggester
(Directory dir, Analyzer analyzer) Create a new instance, loading from a previously built AnalyzingInfixSuggester directory, if it exists.AnalyzingInfixSuggester
(Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, boolean commitOnBuild) Create a new instance, loading from a previously built AnalyzingInfixSuggester directory, if it exists.AnalyzingInfixSuggester
(Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, boolean commitOnBuild, boolean allTermsRequired, boolean highlight) Create a new instance, loading from a previously built AnalyzingInfixSuggester directory, if it exists.AnalyzingInfixSuggester
(Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, boolean commitOnBuild, boolean allTermsRequired, boolean highlight, boolean closeIndexWriterOnBuild) Create a new instance, loading from a previously built AnalyzingInfixSuggester directory, if it exists.AnalyzingSuggester
(Directory tempDir, String tempFileNamePrefix, Analyzer analyzer) AnalyzingSuggester
(Directory tempDir, String tempFileNamePrefix, Analyzer indexAnalyzer, Analyzer queryAnalyzer) AnalyzingSuggester
(Directory tempDir, String tempFileNamePrefix, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int options, int maxSurfaceFormsPerAnalyzedForm, int maxGraphExpansions, boolean preservePositionIncrements) Creates a new suggester.BlendedInfixSuggester
(Directory dir, Analyzer analyzer) Create a new instance, loading from a previously built directory, if it exists.BlendedInfixSuggester
(Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, BlendedInfixSuggester.BlenderType blenderType, int numFactor, boolean commitOnBuild) Create a new instance, loading from a previously built directory, if it exists.BlendedInfixSuggester
(Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars, BlendedInfixSuggester.BlenderType blenderType, int numFactor, Double exponent, boolean commitOnBuild, boolean allTermsRequired, boolean highlight) Create a new instance, loading from a previously built directory, if it exists.FuzzySuggester
(Directory tempDir, String tempFileNamePrefix, Analyzer analyzer) Creates aFuzzySuggester
instance initialized with default values.FuzzySuggester
(Directory tempDir, String tempFileNamePrefix, Analyzer indexAnalyzer, Analyzer queryAnalyzer) Creates aFuzzySuggester
instance with an index and query analyzer initialized with default values.FuzzySuggester
(Directory tempDir, String tempFileNamePrefix, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int options, int maxSurfaceFormsPerAnalyzedForm, int maxGraphExpansions, boolean preservePositionIncrements, int maxEdits, boolean transpositions, int nonFuzzyPrefix, int minFuzzyLength, boolean unicodeAware) Creates aFuzzySuggester
instance. -
Uses of Directory in org.apache.lucene.search.suggest.fst
Fields in org.apache.lucene.search.suggest.fst declared as DirectoryModifier and TypeFieldDescriptionprivate final Directory
FSTCompletionLookup.tempDir
private final Directory
WFSTCompletionLookup.tempDir
Constructors in org.apache.lucene.search.suggest.fst with parameters of type DirectoryModifierConstructorDescriptionFSTCompletionLookup
(Directory tempDir, String tempFileNamePrefix) This constructor prepares for creating a suggested FST using theFSTCompletionLookup.build(InputIterator)
method.FSTCompletionLookup
(Directory tempDir, String tempFileNamePrefix, int buckets, boolean exactMatchFirst) This constructor prepares for creating a suggested FST using theFSTCompletionLookup.build(InputIterator)
method.FSTCompletionLookup
(Directory tempDir, String tempFileNamePrefix, FSTCompletion completion, boolean exactMatchFirst) This constructor takes a pre-built automaton.WFSTCompletionLookup
(Directory tempDir, String tempFileNamePrefix) WFSTCompletionLookup
(Directory tempDir, String tempFileNamePrefix, boolean exactFirst) Creates a new suggester.(package private)
WFSTInputIterator
(Directory tempDir, String tempFileNamePrefix, InputIterator source) -
Uses of Directory in org.apache.lucene.search.suggest.tst
Fields in org.apache.lucene.search.suggest.tst declared as DirectoryConstructors in org.apache.lucene.search.suggest.tst with parameters of type Directory -
Uses of Directory in org.apache.lucene.store
Subclasses of Directory in org.apache.lucene.storeModifier and TypeClassDescriptionclass
Base implementation for a concreteDirectory
that uses aLockFactory
for locking.final class
AByteBuffer
-basedDirectory
implementation that can be used to store index files on the heap.class
Expert: A Directory instance that switches files between two other Directory instances.class
Directory implementation that delegates calls to another directory.class
Base class for Directory implementations that store index files in the file system.final class
This class makes a best-effort check that a providedLock
is valid before any destructive filesystem operation.class
File-basedDirectory
implementation that uses mmap for reading, andFSDirectory.FSIndexOutput
for writing.class
AnFSDirectory
implementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.class
Wraps a RAM-resident directory around any provided delegate directory, to be used during NRT search.final class
Directory that wraps another, and that sleeps and retries if obtaining the lock fails.final class
A delegating Directory that records which files were written to and deleted.Fields in org.apache.lucene.store declared as DirectoryModifier and TypeFieldDescriptionprotected final Directory
FilterDirectory.in
private final Directory
FileSwitchDirectory.primaryDir
private final Directory
FileSwitchDirectory.secondaryDir
Methods in org.apache.lucene.store that return DirectoryModifier and TypeMethodDescriptionfinal Directory
FilterDirectory.getDelegate()
Return the wrappedDirectory
.private Directory
FileSwitchDirectory.getDirectory
(String name) FileSwitchDirectory.getPrimaryDir()
Return the primary directoryFileSwitchDirectory.getSecondaryDir()
Return the secondary directorystatic Directory
Get the wrapped instance bydir
as long as this reader is an instance ofFilterDirectory
.Methods in org.apache.lucene.store with parameters of type DirectoryModifier and TypeMethodDescriptionvoid
Copies an existingsrc
file from directoryfrom
to a non-existent filedest
in this directory.void
void
final Lock
FSLockFactory.obtainLock
(Directory dir, String lockName) abstract Lock
LockFactory.obtainLock
(Directory dir, String lockName) Return a new obtained Lock instance identified by lockName.NoLockFactory.obtainLock
(Directory dir, String lockName) SingleInstanceLockFactory.obtainLock
(Directory dir, String lockName) VerifyingLockFactory.obtainLock
(Directory dir, String lockName) (package private) static boolean
NRTCachingDirectory.slowFileExists
(Directory dir, String fileName) Returns true if the file exists (can be opened), false if it cannot be opened, and (unlike Java's File.exists) throws IOException if there's some unexpected error.static Directory
Get the wrapped instance bydir
as long as this reader is an instance ofFilterDirectory
.Constructors in org.apache.lucene.store with parameters of type DirectoryModifierConstructorDescriptionFileSwitchDirectory
(Set<String> primaryExtensions, Directory primaryDir, Directory secondaryDir, boolean doClose) protected
Sole constructor, typically called from sub-classes.LockValidatingDirectoryWrapper
(Directory in, Lock writeLock) NRTCachingDirectory
(Directory delegate, double maxMergeSizeMB, double maxCachedMB) We will cache a newly created output if 1) it's a flush or a merge and the estimated size of the merged segment is<= maxMergeSizeMB
, and 2) the total cached bytes is<= maxCachedMB
SleepingLockWrapper
(Directory delegate, long lockWaitTimeout) Create a new SleepingLockFactorySleepingLockWrapper
(Directory delegate, long lockWaitTimeout, long pollInterval) Create a new SleepingLockFactory -
Uses of Directory in org.apache.lucene.util
Fields in org.apache.lucene.util declared as DirectoryModifier and TypeFieldDescriptionprivate final Directory
OfflineSorter.dir
private final Directory
OfflineSorter.MergePartitionsTask.dir
private final Directory
OfflineSorter.SortPartitionTask.dir
private final Directory
FileDeleter.directory
Methods in org.apache.lucene.util that return DirectoryModifier and TypeMethodDescriptionOfflineSorter.getDirectory()
Returns theDirectory
we use to create temp files.Methods in org.apache.lucene.util that return types with arguments of type DirectoryModifier and TypeMethodDescriptionCommandLineUtil.loadDirectoryClass
(String clazzName) Loads a specific Directory implementationMethods in org.apache.lucene.util with parameters of type DirectoryModifier and TypeMethodDescriptionstatic void
IOUtils.deleteFiles
(Directory dir, Collection<String> names) Deletes all given file names.static void
IOUtils.deleteFilesIgnoringExceptions
(Directory dir, String... files) static void
IOUtils.deleteFilesIgnoringExceptions
(Directory dir, Collection<String> files) Deletes all given files, suppressing all thrown IOExceptions.(package private) void
OfflineSorter.mergePartitions
(Directory trackingDir, List<Future<OfflineSorter.Partition>> segments) Merge the most recentmaxTempFile
partitions into a new partition.Constructors in org.apache.lucene.util with parameters of type DirectoryModifierConstructorDescriptionFileDeleter
(Directory directory, BiConsumer<FileDeleter.MsgType, String> messenger) Create a new FileDeleter with a messenger consumes various verbose messagesMergePartitionsTask
(Directory dir, List<Future<OfflineSorter.Partition>> segmentsToMerge) OfflineSorter
(Directory dir, String tempFileNamePrefix) Defaults constructor.OfflineSorter
(Directory dir, String tempFileNamePrefix, Comparator<BytesRef> comparator) Defaults constructor with a custom comparator.OfflineSorter
(Directory dir, String tempFileNamePrefix, Comparator<BytesRef> comparator, OfflineSorter.BufferSize ramBufferSize, int maxTempfiles, int valueLength, ExecutorService exec, int maxPartitionsInRAM) All-details constructor.SortPartitionTask
(Directory dir, OfflineSorter.Partition part) -
Uses of Directory in org.apache.lucene.util.bkd
Fields in org.apache.lucene.util.bkd declared as DirectoryModifier and TypeFieldDescriptionprivate final Directory
BKDRadixSelector.tempDir
(package private) final Directory
OfflinePointWriter.tempDir
Constructors in org.apache.lucene.util.bkd with parameters of type DirectoryModifierConstructorDescriptionBKDRadixSelector
(BKDConfig config, int maxPointsSortInHeap, Directory tempDir, String tempFileNamePrefix) Sole constructor.BKDWriter
(int maxDoc, Directory tempDir, String tempFileNamePrefix, BKDConfig config, double maxMBSortInHeap, long totalPointCount) OfflinePointReader
(BKDConfig config, Directory tempDir, String tempFileName, long start, long length, byte[] reusableBuffer) OfflinePointWriter
(BKDConfig config, Directory tempDir, String tempFileNamePrefix, String desc, long expectedCount) Create a new writer with an unknown number of incoming points