Uses of Class
org.apache.lucene.store.Directory
-
Packages that use Directory Package Description org.apache.lucene.analysis.hunspell A Java implementation of Hunspell stemming and spell-checking algorithms (Hunspell
), and a stemming TokenFilter (HunspellStemFilter
) based on it.org.apache.lucene.backward_codecs.lucene50 Lucene 5.0 file format.org.apache.lucene.backward_codecs.lucene50.compressing Lucene 5.0 compressing format.org.apache.lucene.backward_codecs.lucene60 Lucene 6.0 file format.org.apache.lucene.backward_codecs.lucene70 Components from the Lucene 7.0 index format.org.apache.lucene.backward_codecs.lucene86 Lucene 8.6 file format.org.apache.lucene.backward_codecs.lucene87 Lucene 8.7 file format.org.apache.lucene.backward_codecs.lucene90 Lucene 9.0 file format.org.apache.lucene.backward_codecs.store store helperorg.apache.lucene.classification.utils Utilities for evaluation, data preparation, etc.org.apache.lucene.codecs Codecs API: API for customization of the encoding and structure of the index.org.apache.lucene.codecs.lucene90 Lucene 9.0 file format.org.apache.lucene.codecs.lucene90.compressing Lucene 9.0 compressing format.org.apache.lucene.codecs.lucene94 Lucene 9.4 file format.org.apache.lucene.codecs.lucene99 Lucene 9.9 file format.org.apache.lucene.codecs.simpletext Simpletext Codec: writes human readable postings.org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.misc Miscellaneous Lucene utilities that don't really fit anywhere else.org.apache.lucene.misc.index Misc index tools and index support.org.apache.lucene.misc.store Misc Directory implementations.org.apache.lucene.monitor Monitoring frameworkorg.apache.lucene.search Code to search indices.org.apache.lucene.search.spell Suggest alternate spellings for words.org.apache.lucene.search.suggest Support for Autocomplete/Autosuggestorg.apache.lucene.search.suggest.analyzing Analyzer based autosuggest.org.apache.lucene.search.suggest.fst Finite-state based autosuggest.org.apache.lucene.search.suggest.tst Ternary Search Tree based autosuggest.org.apache.lucene.store Binary i/o API, used for all index data.org.apache.lucene.util Some utility classes.org.apache.lucene.util.bkd 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 Directory Modifier and Type Method Description static SortingStrategy
SortingStrategy. offline(Directory tempDir, java.lang.String tempFileNamePrefix)
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 Directory Constructor Description Dictionary(Directory tempDir, java.lang.String tempFileNamePrefix, java.io.InputStream affix, java.io.InputStream dictionary)
Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.Dictionary(Directory tempDir, java.lang.String tempFileNamePrefix, java.io.InputStream affix, java.util.List<java.io.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.lucene50 Modifier and Type Class Description (package private) class
Lucene50CompoundReader
Class for accessing a compound stream.Fields in org.apache.lucene.backward_codecs.lucene50 declared as Directory Modifier and Type Field Description private Directory
Lucene50CompoundReader. directory
Methods in org.apache.lucene.backward_codecs.lucene50 with parameters of type Directory Modifier and Type Method Description StoredFieldsReader
Lucene50StoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
StoredFieldsWriter
Lucene50StoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)
CompoundDirectory
Lucene50CompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
private java.util.Map<java.lang.String,Lucene50CompoundReader.FileEntry>
Lucene50CompoundReader. readEntries(byte[] segmentID, Directory dir, java.lang.String entriesFileName)
Helper method that reads CFS entries from an input streamBits
Lucene50LiveDocsFormat. 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 Directory Constructor Description Lucene50CompoundReader(Directory directory, SegmentInfo si, IOContext context)
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 Directory Modifier and Type Method Description StoredFieldsReader
Lucene50CompressingStoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
StoredFieldsWriter
Lucene50CompressingStoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)
TermVectorsReader
Lucene50CompressingTermVectorsFormat. vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)
TermVectorsWriter
Lucene50CompressingTermVectorsFormat. vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)
Constructors in org.apache.lucene.backward_codecs.lucene50.compressing with parameters of type Directory Constructor Description FieldsIndexReader(Directory dir, java.lang.String name, java.lang.String suffix, java.lang.String extension, java.lang.String codecName, byte[] id, IndexInput metaIn)
Lucene50CompressingStoredFieldsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode)
Sole constructor.Lucene50CompressingTermVectorsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.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 Directory Modifier and Type Method Description FieldInfos
Lucene60FieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, java.lang.String segmentSuffix, IOContext context)
void
Lucene60FieldInfosFormat. write(Directory directory, SegmentInfo segmentInfo, java.lang.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 Directory Modifier and Type Method Description private SegmentInfo
Lucene70SegmentInfoFormat. parseSegmentInfo(Directory dir, DataInput input, java.lang.String segment, byte[] segmentID)
SegmentInfo
Lucene70SegmentInfoFormat. read(Directory dir, java.lang.String segment, byte[] segmentID, IOContext context)
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 Directory Modifier and Type Method Description private SegmentInfo
Lucene86SegmentInfoFormat. parseSegmentInfo(Directory dir, DataInput input, java.lang.String segment, byte[] segmentID)
SegmentInfo
Lucene86SegmentInfoFormat. read(Directory dir, java.lang.String segment, byte[] segmentID, IOContext context)
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 Directory Modifier and Type Method Description StoredFieldsReader
Lucene87StoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
StoredFieldsWriter
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 Directory Modifier and Type Method Description private SegmentInfo
Lucene90SegmentInfoFormat. parseSegmentInfo(Directory dir, DataInput input, java.lang.String segment, byte[] segmentID)
FieldInfos
Lucene90FieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, java.lang.String segmentSuffix, IOContext context)
SegmentInfo
Lucene90SegmentInfoFormat. read(Directory dir, java.lang.String segment, byte[] segmentID, IOContext context)
void
Lucene90FieldInfosFormat. write(Directory directory, SegmentInfo segmentInfo, java.lang.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 Directory Modifier and Type Method Description static IndexOutput
EndiannessReverserUtil. createOutput(Directory directory, java.lang.String name, IOContext context)
Open an index outputstatic IndexOutput
EndiannessReverserUtil. createTempOutput(Directory directory, java.lang.String prefix, java.lang.String suffix, IOContext context)
Open a temp index outputstatic ChecksumIndexInput
EndiannessReverserUtil. openChecksumInput(Directory directory, java.lang.String name, IOContext context)
Open a checksum index inputstatic IndexInput
EndiannessReverserUtil. openInput(Directory directory, java.lang.String name, IOContext context)
Open an index input -
Uses of Directory in org.apache.lucene.classification.utils
Methods in org.apache.lucene.classification.utils with parameters of type Directory Modifier and Type Method Description void
DatasetSplitter. split(IndexReader originalIndex, Directory trainingIndex, Directory testIndex, Directory crossValidationIndex, Analyzer analyzer, boolean termVectors, java.lang.String classFieldName, java.lang.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.codecs Modifier and Type Class Description class
CompoundDirectory
A read-onlyDirectory
that consists of a view over a compound file.Methods in org.apache.lucene.codecs with parameters of type Directory Modifier and Type Method Description abstract 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, IOContext context)
Returns a Directory view (read-only) for the compound files in this segmentabstract FieldInfos
FieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, java.lang.String segmentSuffix, IOContext iocontext)
abstract SegmentInfo
SegmentInfoFormat. read(Directory directory, java.lang.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, java.lang.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.lucene90 Modifier and Type Class Description (package private) class
Lucene90CompoundReader
Class for accessing a compound stream.Fields in org.apache.lucene.codecs.lucene90 declared as Directory Modifier and Type Field Description private Directory
Lucene90CompoundReader. directory
Methods in org.apache.lucene.codecs.lucene90 with parameters of type Directory Modifier and Type Method Description StoredFieldsReader
Lucene90StoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
StoredFieldsWriter
Lucene90StoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)
CompoundDirectory
Lucene90CompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
private java.util.Map<java.lang.String,Lucene90CompoundReader.FileEntry>
Lucene90CompoundReader. readEntries(byte[] segmentID, Directory dir, java.lang.String entriesFileName)
Helper method that reads CFS entries from an input streamBits
Lucene90LiveDocsFormat. 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 Directory Constructor Description Lucene90CompoundReader(Directory directory, SegmentInfo si, IOContext context)
Create a new CompoundFileDirectory. -
Uses of Directory in org.apache.lucene.codecs.lucene90.compressing
Fields in org.apache.lucene.codecs.lucene90.compressing declared as Directory Modifier and Type Field Description private Directory
FieldsIndexWriter. dir
Methods in org.apache.lucene.codecs.lucene90.compressing with parameters of type Directory Modifier and Type Method Description StoredFieldsReader
Lucene90CompressingStoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
StoredFieldsWriter
Lucene90CompressingStoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)
TermVectorsReader
Lucene90CompressingTermVectorsFormat. vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)
TermVectorsWriter
Lucene90CompressingTermVectorsFormat. vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)
Constructors in org.apache.lucene.codecs.lucene90.compressing with parameters of type Directory Constructor Description FieldsIndexReader(Directory dir, java.lang.String name, java.lang.String suffix, java.lang.String extension, java.lang.String codecName, byte[] id, IndexInput metaIn)
FieldsIndexWriter(Directory dir, java.lang.String name, java.lang.String suffix, java.lang.String extension, java.lang.String codecName, byte[] id, int blockShift, IOContext ioContext)
Lucene90CompressingStoredFieldsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode)
Sole constructor.Lucene90CompressingStoredFieldsWriter(Directory directory, SegmentInfo si, java.lang.String segmentSuffix, IOContext context, java.lang.String formatName, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk, int blockShift)
Sole constructor.Lucene90CompressingTermVectorsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode)
Sole constructor.Lucene90CompressingTermVectorsWriter(Directory directory, SegmentInfo si, java.lang.String segmentSuffix, IOContext context, java.lang.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 Directory Modifier and Type Method Description FieldInfos
Lucene94FieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, java.lang.String segmentSuffix, IOContext context)
void
Lucene94FieldInfosFormat. write(Directory directory, SegmentInfo segmentInfo, java.lang.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 Directory Modifier and Type Method Description private SegmentInfo
Lucene99SegmentInfoFormat. parseSegmentInfo(Directory dir, DataInput input, java.lang.String segment, byte[] segmentID)
SegmentInfo
Lucene99SegmentInfoFormat. read(Directory dir, java.lang.String segment, byte[] segmentID, IOContext context)
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 Directory Modifier and Type Method Description StoredFieldsReader
SimpleTextStoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
StoredFieldsWriter
SimpleTextStoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)
CompoundDirectory
SimpleTextCompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
FieldInfos
SimpleTextFieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, java.lang.String segmentSuffix, IOContext iocontext)
SegmentInfo
SimpleTextSegmentInfoFormat. read(Directory directory, java.lang.String segmentName, byte[] segmentID, IOContext context)
Bits
SimpleTextLiveDocsFormat. readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context)
TermVectorsReader
SimpleTextTermVectorsFormat. vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)
TermVectorsWriter
SimpleTextTermVectorsFormat. vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)
void
SimpleTextCompoundFormat. write(Directory dir, SegmentInfo si, IOContext context)
void
SimpleTextFieldInfosFormat. write(Directory directory, SegmentInfo segmentInfo, java.lang.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 Directory Constructor Description SimpleTextBKDWriter(int maxDoc, Directory tempDir, java.lang.String tempFileNamePrefix, BKDConfig config, double maxMBSortInHeap, long totalPointCount)
SimpleTextStoredFieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
SimpleTextStoredFieldsWriter(Directory directory, java.lang.String segment, IOContext context)
SimpleTextTermVectorsReader(Directory directory, SegmentInfo si, IOContext context)
SimpleTextTermVectorsWriter(Directory directory, java.lang.String segment, IOContext context)
-
Uses of Directory in org.apache.lucene.index
Subclasses of Directory in org.apache.lucene.index Modifier and Type Class Description (package private) class
TrackingTmpOutputDirectoryWrapper
Fields in org.apache.lucene.index declared as Directory Modifier and Type Field Description private Directory
CheckIndex. dir
Directory
CheckIndex.Status. dir
Directory index is in.private Directory
IndexUpgrader. dir
private Directory
PersistentSnapshotDeletionPolicy. dir
Directory
SegmentInfo. dir
Where this segment resides.(package private) Directory
StandardDirectoryReader.ReaderCommit. dir
protected Directory
DirectoryReader. directory
The index directory.private Directory
IndexFileDeleter. directory
private Directory
IndexWriter. directory
private Directory
ReaderPool. directory
(package private) Directory
SegmentInfos.FindSegmentsFile. directory
private Directory
SegmentMerger. directory
Directory
SegmentReadState. directory
Directory
where this segment is read from.Directory
SegmentWriteState. directory
Directory
where this segment will be written to.(package private) Directory
StoredFieldsConsumer. directory
protected Directory
TermVectorsConsumer. directory
private Directory
VectorValuesConsumer. directory
(package private) Directory
IndexFileDeleter.CommitPoint. directoryOrig
private Directory
IndexFileDeleter. directoryOrig
private Directory
IndexWriter. directoryOrig
private Directory
ReaderPool. originalDirectory
Methods in org.apache.lucene.index that return Directory Modifier and Type Method Description Directory
DirectoryReader. directory()
Returns the directory this index resides in.Directory
SegmentReader. directory()
Returns the directory this index resides in.abstract Directory
IndexCommit. getDirectory()
Returns theDirectory
for the index.Directory
IndexFileDeleter.CommitPoint. getDirectory()
Directory
IndexWriter. getDirectory()
Returns the Directory used by this index.Directory
SnapshotDeletionPolicy.SnapshotCommitPoint. getDirectory()
Directory
StandardDirectoryReader.ReaderCommit. getDirectory()
Directory
ConcurrentMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)
Directory
MergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)
Wraps the incomingDirectory
so that we can merge-throttle it usingRateLimitedIndexOutput
.Directory
NoMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)
Methods in org.apache.lucene.index with parameters of type Directory Modifier and Type Method Description private java.util.List<Lock>
IndexWriter. 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.void
SegmentInfos. commit(Directory dir)
Writes and syncs to the Directory dir, taking care to remove the segments file on exception(package private) java.lang.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 java.lang.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, java.util.Map<java.lang.Integer,java.util.Set<java.lang.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 java.util.List<IndexCommit>
DirectoryReader. listCommits(Directory dir)
Returns all commit points that exist in the Directory.private RefCount<DocValuesProducer>
SegmentDocValues. newDocValuesProducer(SegmentCommitInfo si, Directory dir, java.lang.Long gen, FieldInfos infos)
private void
IndexWriter. noDupDirs(Directory... dirs)
static DirectoryReader
DirectoryReader. open(Directory directory)
Returns a IndexReader reading the index in the given Directorystatic DirectoryReader
DirectoryReader. open(Directory directory, java.util.Comparator<LeafReader> leafSorter)
Returns a IndexReader for the the index in the given Directory(package private) static DirectoryReader
StandardDirectoryReader. open(Directory directory, int minSupportedMajorVersion, IndexCommit commit, java.util.Comparator<LeafReader> leafSorter)
called from DirectoryReader.open(...) methods(package private) static DirectoryReader
StandardDirectoryReader. open(Directory directory, IndexCommit commit, java.util.Comparator<LeafReader> leafSorter)
static DirectoryReader
StandardDirectoryReader. open(Directory directory, SegmentInfos infos, java.util.List<? extends LeafReader> oldReaders, java.util.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) void
SegmentInfos. prepareCommit(Directory dir)
Call this to start a commit.static SegmentInfos
SegmentInfos. readCommit(Directory directory, java.lang.String segmentFileName)
Read a particular segmentFileName.(package private) static SegmentInfos
SegmentInfos. readCommit(Directory directory, java.lang.String segmentFileName, int minSupportedMajorVersion)
static SegmentInfos
SegmentInfos. readCommit(Directory directory, ChecksumIndexInput input, long generation)
Read the commit from the providedChecksumIndexInput
.(package private) static SegmentInfos
SegmentInfos. readCommit(Directory directory, ChecksumIndexInput input, long generation, int minSupportedMajorVersion)
Read the commit from the providedChecksumIndexInput
.static SegmentInfos
SegmentInfos. readLatestCommit(Directory directory)
Find the latest commit (segments_N file
) and load allSegmentCommitInfo
s.static 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.Sorter.DocMap
MergePolicy.OneMerge. reorder(CodecReader reader, Directory dir)
Extend this method if you wish to renumber doc IDs.(package private) void
SegmentInfos. rollbackCommit(Directory dir)
java.lang.String
MergePolicy.MergeSpecification. segString(Directory dir)
Returns a description of the merges in this specification.Directory
ConcurrentMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)
Directory
MergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)
Wraps the incomingDirectory
so that we can merge-throttle it usingRateLimitedIndexOutput
.Directory
NoMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)
private void
SegmentInfos. write(Directory directory)
private java.util.Set<java.lang.String>
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 Directory Constructor Description CheckIndex(Directory dir)
Create a new CheckIndex on the directory.CheckIndex(Directory dir, Lock writeLock)
Expert: create a directory with the specified lock.CommitPoint(java.util.Collection<IndexFileDeleter.CommitPoint> commitsToDelete, Directory directoryOrig, SegmentInfos segmentInfos)
DirectoryReader(Directory directory, LeafReader[] segmentReaders, java.util.Comparator<LeafReader> leafSorter)
Expert: Constructs aDirectoryReader
on the given subReaders.DocumentsWriter(DocumentsWriter.FlushNotifications flushNotifications, int indexCreatedVersionMajor, java.util.concurrent.atomic.AtomicLong pendingNumDocs, boolean enableTestPoints, java.util.function.Supplier<java.lang.String> segmentNameSupplier, LiveIndexWriterConfig config, Directory directoryOrig, Directory directory, FieldInfos.FieldNumbers globalFieldNumberMap)
DocumentsWriterPerThread(int indexVersionCreated, java.lang.String segmentName, Directory directoryOrig, Directory directory, LiveIndexWriterConfig indexWriterConfig, DocumentsWriterDeleteQueue deleteQueue, FieldInfos.Builder fieldInfos, java.util.concurrent.atomic.AtomicLong pendingNumDocs, boolean enableTestPoints)
FindSegmentsFile(Directory directory)
Sole constructor.IndexFileDeleter(java.lang.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.IndexingChain(int indexCreatedVersionMajor, SegmentInfo segmentInfo, Directory directory, FieldInfos.Builder fieldInfos, LiveIndexWriterConfig indexWriterConfig, java.util.function.Consumer<java.lang.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.ReaderCommit(StandardDirectoryReader reader, SegmentInfos infos, Directory dir)
ReaderManager(Directory dir)
Creates and returns a new ReaderManager from the givenDirectory
.ReaderPool(Directory directory, Directory originalDirectory, SegmentInfos segmentInfos, FieldInfos.FieldNumbers fieldNumbers, java.util.function.LongSupplier completedDelGenSupplier, InfoStream infoStream, java.lang.String softDeletesField, StandardDirectoryReader reader)
SegmentCoreReaders(Directory dir, SegmentCommitInfo si, IOContext context)
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, java.lang.String name, int maxDoc, boolean isCompoundFile, boolean hasBlocks, Codec codec, java.util.Map<java.lang.String,java.lang.String> diagnostics, byte[] id, java.util.Map<java.lang.String,java.lang.String> attributes, Sort indexSort)
Construct a new complete SegmentInfo instance from input.SegmentMerger(java.util.List<CodecReader> readers, SegmentInfo segmentInfo, InfoStream infoStream, Directory dir, FieldInfos.FieldNumbers fieldNumbers, IOContext context)
SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context)
Create aSegmentReadState
.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, java.lang.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, java.lang.String segmentSuffix)
Constructor which takes segment suffix.SortingStoredFieldsConsumer(Codec codec, Directory directory, SegmentInfo info)
SortingTermVectorsConsumer(IntBlockPool.Allocator intBlockAllocator, ByteBlockPool.Allocator byteBlockAllocator, Directory directory, SegmentInfo info, Codec codec)
StandardDirectoryReader(Directory directory, LeafReader[] readers, IndexWriter writer, SegmentInfos sis, java.util.Comparator<LeafReader> leafSorter, boolean applyAllDeletes, boolean writeAllDeletes)
package private constructor, called only from static open() methods.StoredFieldsConsumer(Codec codec, Directory directory, SegmentInfo info)
TermVectorsConsumer(IntBlockPool.Allocator intBlockAllocator, ByteBlockPool.Allocator byteBlockAllocator, Directory directory, SegmentInfo info, Codec codec)
TrackingTmpOutputDirectoryWrapper(Directory in)
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 Modifier and Type Method Description static void
GetTermInfo. getTermInfo(Directory dir, Term term)
-
Uses of Directory in org.apache.lucene.misc.index
Fields in org.apache.lucene.misc.index declared as Directory Modifier and Type Field Description private Directory
PKIndexSplitter. dir1
private Directory
PKIndexSplitter. dir2
private Directory
BPIndexReorderer.ForwardIndexSorter. directory
protected Directory
IndexRearranger. input
private Directory
PKIndexSplitter. input
protected Directory
IndexRearranger. output
Methods in org.apache.lucene.misc.index with parameters of type Directory Modifier and Type Method Description private BPIndexReorderer.ForwardIndex
BPIndexReorderer. buildForwardIndex(Directory tempDir, java.lang.String postingsFileName, int maxDoc, int maxTerm)
Sorter.DocMap
BPIndexReorderer. computeDocMap(CodecReader reader, Directory tempDir)
Expert: Compute theSorter.DocMap
that holds the new doc ID numbering.private int[]
BPIndexReorderer. computePermutation(CodecReader reader, java.util.Set<java.lang.String> fields, Directory dir)
Compute a permutation of the doc ID space that reduces log gaps between consecutive postings.static java.util.List<IndexRearranger.DocumentSelector>
BinaryDocValueSelector. createFromExistingIndex(java.lang.String field, Directory directory)
private void
PKIndexSplitter. createIndex(IndexWriterConfig config, Directory target, DirectoryReader reader, Query preserveFilter, boolean negateFilter)
CodecReader
BPIndexReorderer. reorder(CodecReader reader, Directory tempDir)
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, java.util.Set<java.lang.String> fields, Directory tempDir, DataOutput postingsOut)
Constructors in org.apache.lucene.misc.index with parameters of type Directory Constructor Description ForwardIndexSorter(Directory directory)
IndexRearranger(Directory input, Directory output, IndexWriterConfig config, java.util.List<IndexRearranger.DocumentSelector> documentSelectors)
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.store Modifier and Type Class Description class
ByteWritesTrackingDirectoryWrapper
FilterDirectory
that tracks write amplification factorclass
DirectIODirectory
ADirectory
implementation for all Unixes and Windows that uses DIRECT I/O to bypass OS level IO caching during merging.class
HardlinkCopyDirectoryWrapper
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
RAFDirectory
A straightforward implementation ofFSDirectory
using java.io.RandomAccessFile.Methods in org.apache.lucene.misc.store with parameters of type Directory Modifier and Type Method Description void
HardlinkCopyDirectoryWrapper. copyFrom(Directory from, java.lang.String srcFile, java.lang.String destFile, IOContext context)
Constructors in org.apache.lucene.misc.store with parameters of type Directory Constructor Description ByteWritesTrackingDirectoryWrapper(Directory in)
ByteWritesTrackingDirectoryWrapper(Directory in, boolean trackTempOutput)
Constructor with option to track tempOutputHardlinkCopyDirectoryWrapper(Directory in)
Creates a new HardlinkCopyDirectoryWrapper delegating to the given directory -
Uses of Directory in org.apache.lucene.monitor
Fields in org.apache.lucene.monitor declared as Directory Modifier and Type Field Description private Directory
DocumentBatch.MultiDocumentBatch. directory
Fields in org.apache.lucene.monitor with type parameters of type Directory Modifier and Type Field Description private IOSupplier<Directory>
MonitorConfiguration. directoryProvider
Methods in org.apache.lucene.monitor that return types with arguments of type Directory Modifier and Type Method Description IOSupplier<Directory>
MonitorConfiguration. getDirectoryProvider()
Method parameters in org.apache.lucene.monitor with type arguments of type Directory Modifier and Type Method Description MonitorConfiguration
MonitorConfiguration. setDirectoryProvider(IOSupplier<Directory> directoryProvider, MonitorQuerySerializer serializer)
MonitorConfiguration
MonitorConfiguration. setDirectoryProvider(IOSupplier<Directory> directoryProvider, MonitorQuerySerializer serializer, java.lang.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 Directory Constructor Description SearcherManager(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 Directory Modifier and Type Field Description (package private) Directory
SpellChecker. spellIndex
the spell indexMethods in org.apache.lucene.search.spell with parameters of type Directory Modifier and Type Method Description (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 Directory Constructor Description SpellChecker(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, java.util.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 Directory Modifier and Type Field Description private Directory
SortedInputIterator. tempDir
Constructors in org.apache.lucene.search.suggest with parameters of type Directory Constructor Description SortedInputIterator(Directory tempDir, java.lang.String tempFileNamePrefix, InputIterator source)
Creates a new sorted wrapper, using natural order for sorting.SortedInputIterator(Directory tempDir, java.lang.String tempFileNamePrefix, InputIterator source, java.util.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 Directory Modifier and Type Field Description private Directory
AnalyzingInfixSuggester. dir
private Directory
AnalyzingSuggester. tempDir
Methods in org.apache.lucene.search.suggest.analyzing that return Directory Modifier and Type Method Description protected Directory
AnalyzingInfixSuggester. getDirectory(java.nio.file.Path path)
Subclass can override to choose a specificDirectory
implementation.Constructors in org.apache.lucene.search.suggest.analyzing with parameters of type Directory Constructor Description AnalyzingInfixSuggester(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, java.lang.String tempFileNamePrefix, Analyzer analyzer)
AnalyzingSuggester(Directory tempDir, java.lang.String tempFileNamePrefix, Analyzer indexAnalyzer, Analyzer queryAnalyzer)
AnalyzingSuggester(Directory tempDir, java.lang.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, java.lang.Double exponent, boolean commitOnBuild, boolean allTermsRequired, boolean highlight)
Create a new instance, loading from a previously built directory, if it exists.FuzzySuggester(Directory tempDir, java.lang.String tempFileNamePrefix, Analyzer analyzer)
Creates aFuzzySuggester
instance initialized with default values.FuzzySuggester(Directory tempDir, java.lang.String tempFileNamePrefix, Analyzer indexAnalyzer, Analyzer queryAnalyzer)
Creates aFuzzySuggester
instance with an index and query analyzer initialized with default values.FuzzySuggester(Directory tempDir, java.lang.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 Directory Modifier and Type Field Description private Directory
FSTCompletionLookup. tempDir
private Directory
WFSTCompletionLookup. tempDir
Constructors in org.apache.lucene.search.suggest.fst with parameters of type Directory Constructor Description FSTCompletionLookup(Directory tempDir, java.lang.String tempFileNamePrefix)
This constructor prepares for creating a suggested FST using theFSTCompletionLookup.build(InputIterator)
method.FSTCompletionLookup(Directory tempDir, java.lang.String tempFileNamePrefix, int buckets, boolean exactMatchFirst)
This constructor prepares for creating a suggested FST using theFSTCompletionLookup.build(InputIterator)
method.FSTCompletionLookup(Directory tempDir, java.lang.String tempFileNamePrefix, FSTCompletion completion, boolean exactMatchFirst)
This constructor takes a pre-built automaton.WFSTCompletionLookup(Directory tempDir, java.lang.String tempFileNamePrefix)
WFSTCompletionLookup(Directory tempDir, java.lang.String tempFileNamePrefix, boolean exactFirst)
Creates a new suggester.WFSTInputIterator(Directory tempDir, java.lang.String tempFileNamePrefix, InputIterator source)
-
Uses of Directory in org.apache.lucene.search.suggest.tst
Fields in org.apache.lucene.search.suggest.tst declared as Directory Modifier and Type Field Description private Directory
TSTLookup. tempDir
Constructors in org.apache.lucene.search.suggest.tst with parameters of type Directory Constructor Description TSTLookup(Directory tempDir, java.lang.String tempFileNamePrefix)
Creates a new TSTLookup, for building. -
Uses of Directory in org.apache.lucene.store
Subclasses of Directory in org.apache.lucene.store Modifier and Type Class Description class
BaseDirectory
Base implementation for a concreteDirectory
that uses aLockFactory
for locking.class
ByteBuffersDirectory
AByteBuffer
-basedDirectory
implementation that can be used to store index files on the heap.class
FileSwitchDirectory
Expert: A Directory instance that switches files between two other Directory instances.class
FilterDirectory
Directory implementation that delegates calls to another directory.class
FSDirectory
Base class for Directory implementations that store index files in the file system.class
LockValidatingDirectoryWrapper
This class makes a best-effort check that a providedLock
is valid before any destructive filesystem operation.class
MMapDirectory
File-basedDirectory
implementation that uses mmap for reading, andFSDirectory.FSIndexOutput
for writing.class
NIOFSDirectory
AnFSDirectory
implementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.class
NRTCachingDirectory
Wraps a RAM-resident directory around any provided delegate directory, to be used during NRT search.class
SleepingLockWrapper
Directory that wraps another, and that sleeps and retries if obtaining the lock fails.class
TrackingDirectoryWrapper
A delegating Directory that records which files were written to and deleted.Fields in org.apache.lucene.store declared as Directory Modifier and Type Field Description protected Directory
FilterDirectory. in
private Directory
FileSwitchDirectory. primaryDir
private Directory
FileSwitchDirectory. secondaryDir
Methods in org.apache.lucene.store that return Directory Modifier and Type Method Description Directory
FilterDirectory. getDelegate()
Return the wrappedDirectory
.private Directory
FileSwitchDirectory. getDirectory(java.lang.String name)
Directory
FileSwitchDirectory. getPrimaryDir()
Return the primary directoryDirectory
FileSwitchDirectory. getSecondaryDir()
Return the secondary directorystatic Directory
FilterDirectory. unwrap(Directory dir)
Get the wrapped instance bydir
as long as this reader is an instance ofFilterDirectory
.Methods in org.apache.lucene.store with parameters of type Directory Modifier and Type Method Description void
Directory. copyFrom(Directory from, java.lang.String src, java.lang.String dest, IOContext context)
Copies an existingsrc
file from directoryfrom
to a non-existent filedest
in this directory.void
LockValidatingDirectoryWrapper. copyFrom(Directory from, java.lang.String src, java.lang.String dest, IOContext context)
void
TrackingDirectoryWrapper. copyFrom(Directory from, java.lang.String src, java.lang.String dest, IOContext context)
Lock
FSLockFactory. obtainLock(Directory dir, java.lang.String lockName)
abstract Lock
LockFactory. obtainLock(Directory dir, java.lang.String lockName)
Return a new obtained Lock instance identified by lockName.Lock
NoLockFactory. obtainLock(Directory dir, java.lang.String lockName)
Lock
SingleInstanceLockFactory. obtainLock(Directory dir, java.lang.String lockName)
Lock
VerifyingLockFactory. obtainLock(Directory dir, java.lang.String lockName)
(package private) static boolean
NRTCachingDirectory. slowFileExists(Directory dir, java.lang.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
FilterDirectory. unwrap(Directory dir)
Get the wrapped instance bydir
as long as this reader is an instance ofFilterDirectory
.Constructors in org.apache.lucene.store with parameters of type Directory Constructor Description FileSwitchDirectory(java.util.Set<java.lang.String> primaryExtensions, Directory primaryDir, Directory secondaryDir, boolean doClose)
FilterDirectory(Directory in)
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 SleepingLockFactoryTrackingDirectoryWrapper(Directory in)
-
Uses of Directory in org.apache.lucene.util
Fields in org.apache.lucene.util declared as Directory Modifier and Type Field Description private Directory
OfflineSorter. dir
private Directory
OfflineSorter.MergePartitionsTask. dir
private Directory
OfflineSorter.SortPartitionTask. dir
private Directory
FileDeleter. directory
Methods in org.apache.lucene.util that return Directory Modifier and Type Method Description Directory
OfflineSorter. getDirectory()
Returns theDirectory
we use to create temp files.Methods in org.apache.lucene.util that return types with arguments of type Directory Modifier and Type Method Description static java.lang.Class<? extends Directory>
CommandLineUtil. loadDirectoryClass(java.lang.String clazzName)
Loads a specific Directory implementationMethods in org.apache.lucene.util with parameters of type Directory Modifier and Type Method Description static void
IOUtils. deleteFiles(Directory dir, java.util.Collection<java.lang.String> names)
Deletes all given file names.static void
IOUtils. deleteFilesIgnoringExceptions(Directory dir, java.lang.String... files)
static void
IOUtils. deleteFilesIgnoringExceptions(Directory dir, java.util.Collection<java.lang.String> files)
Deletes all given files, suppressing all thrown IOExceptions.(package private) void
OfflineSorter. mergePartitions(Directory trackingDir, java.util.List<java.util.concurrent.Future<OfflineSorter.Partition>> segments)
Merge the most recentmaxTempFile
partitions into a new partition.Constructors in org.apache.lucene.util with parameters of type Directory Constructor Description FileDeleter(Directory directory, java.util.function.BiConsumer<FileDeleter.MsgType,java.lang.String> messenger)
Create a new FileDeleter with a messenger consumes various verbose messagesMergePartitionsTask(Directory dir, java.util.List<java.util.concurrent.Future<OfflineSorter.Partition>> segmentsToMerge)
OfflineSorter(Directory dir, java.lang.String tempFileNamePrefix)
Defaults constructor.OfflineSorter(Directory dir, java.lang.String tempFileNamePrefix, java.util.Comparator<BytesRef> comparator)
Defaults constructor with a custom comparator.OfflineSorter(Directory dir, java.lang.String tempFileNamePrefix, java.util.Comparator<BytesRef> comparator, OfflineSorter.BufferSize ramBufferSize, int maxTempfiles, int valueLength, java.util.concurrent.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 Directory Modifier and Type Field Description private Directory
BKDRadixSelector. tempDir
(package private) Directory
OfflinePointWriter. tempDir
Constructors in org.apache.lucene.util.bkd with parameters of type Directory Constructor Description BKDRadixSelector(BKDConfig config, int maxPointsSortInHeap, Directory tempDir, java.lang.String tempFileNamePrefix)
Sole constructor.BKDWriter(int maxDoc, Directory tempDir, java.lang.String tempFileNamePrefix, BKDConfig config, double maxMBSortInHeap, long totalPointCount)
OfflinePointReader(BKDConfig config, Directory tempDir, java.lang.String tempFileName, long start, long length, byte[] reusableBuffer)
OfflinePointWriter(BKDConfig config, Directory tempDir, java.lang.String tempFileNamePrefix, java.lang.String desc, long expectedCount)
Create a new writer with an unknown number of incoming points
-