Uses of Class
org.apache.lucene.store.Directory
-
Packages that use Directory Package Description org.apache.lucene.analysis.hunspell Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.org.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.compressing StoredFieldsFormat that allows cross-document and cross-field compression of stored fields.org.apache.lucene.codecs.lucene50 Components from the Lucene 5.0 index format Seeorg.apache.lucene.codecs.lucene80
for an overview of the index format.org.apache.lucene.codecs.lucene60 Components from the Lucene 6.0 index format.org.apache.lucene.codecs.lucene70 Components from the Lucene 7.0 index 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 index tools.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 private void
Dictionary. readDictionaryFiles(Directory tempDir, java.lang.String tempFileNamePrefix, java.util.List<java.io.InputStream> dictionaries, java.nio.charset.CharsetDecoder decoder, Builder<IntsRef> words)
Reads the dictionary file through the provided InputStreams, building up the words mapConstructors 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.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
Methods in org.apache.lucene.codecs that return Directory Modifier and Type Method Description abstract Directory
CompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
Returns a Directory view (read-only) for the compound files in this segmentMethods 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 Directory
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.compressing
Methods in org.apache.lucene.codecs.compressing with parameters of type Directory Modifier and Type Method Description StoredFieldsReader
CompressingStoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
StoredFieldsWriter
CompressingStoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)
TermVectorsReader
CompressingTermVectorsFormat. vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)
TermVectorsWriter
CompressingTermVectorsFormat. vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)
Constructors in org.apache.lucene.codecs.compressing with parameters of type Directory Constructor Description CompressingStoredFieldsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode)
Sole constructor.CompressingStoredFieldsWriter(Directory directory, SegmentInfo si, java.lang.String segmentSuffix, IOContext context, java.lang.String formatName, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk, int blockSize)
Sole constructor.CompressingTermVectorsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode)
Sole constructor.CompressingTermVectorsWriter(Directory directory, SegmentInfo si, java.lang.String segmentSuffix, IOContext context, java.lang.String formatName, CompressionMode compressionMode, int chunkSize, int blockSize)
Sole constructor. -
Uses of Directory in org.apache.lucene.codecs.lucene50
Subclasses of Directory in org.apache.lucene.codecs.lucene50 Modifier and Type Class Description (package private) class
Lucene50CompoundReader
Class for accessing a compound stream.Fields in org.apache.lucene.codecs.lucene50 declared as Directory Modifier and Type Field Description private Directory
Lucene50CompoundReader. directory
Methods in org.apache.lucene.codecs.lucene50 that return Directory Modifier and Type Method Description Directory
Lucene50CompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
Methods in org.apache.lucene.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)
Directory
Lucene50CompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
FieldInfos
Lucene50FieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, java.lang.String segmentSuffix, 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
Lucene50FieldInfosFormat. write(Directory directory, SegmentInfo segmentInfo, java.lang.String segmentSuffix, FieldInfos infos, IOContext context)
void
Lucene50LiveDocsFormat. writeLiveDocs(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context)
Constructors in org.apache.lucene.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.codecs.lucene60
Methods in org.apache.lucene.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)
-
Uses of Directory in org.apache.lucene.codecs.lucene70
Methods in org.apache.lucene.codecs.lucene70 with parameters of type Directory Modifier and Type Method Description 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.codecs.simpletext
Fields in org.apache.lucene.codecs.simpletext declared as Directory Modifier and Type Field Description private Directory
SimpleTextStoredFieldsWriter. directory
private Directory
SimpleTextTermVectorsWriter. directory
Methods in org.apache.lucene.codecs.simpletext that return Directory Modifier and Type Method Description Directory
SimpleTextCompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
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)
Directory
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, int numDataDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode, 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 (package private) Directory
SegmentCoreReaders. cfsReader
private Directory
CheckIndex. dir
Directory
CheckIndex.Status. dir
Directory index is in.private Directory
IndexUpgrader. dir
private Directory
MergePolicy.MergeException. dir
private Directory
PersistentSnapshotDeletionPolicy. dir
Directory
SegmentInfo. dir
Where this segment resides.(package private) Directory
StandardDirectoryReader.ReaderCommit. dir
private Directory
PKIndexSplitter. dir1
private Directory
PKIndexSplitter. dir2
protected Directory
DirectoryReader. directory
The index directory.private Directory
DocumentsWriter. 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.private Directory
DocumentsWriter. directoryOrig
(package private) Directory
DocumentsWriterPerThread. directoryOrig
(package private) Directory
IndexFileDeleter.CommitPoint. directoryOrig
private Directory
IndexFileDeleter. directoryOrig
private Directory
IndexWriter. directoryOrig
private Directory
PKIndexSplitter. input
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
MergePolicy.MergeException. getDirectory()
Returns theDirectory
of the index that hit the exception.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 exceptionprivate void
PKIndexSplitter. createIndex(IndexWriterConfig config, Directory target, DirectoryReader reader, Query preserveFilter, boolean negateFilter)
(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)
protected void
ConcurrentMergeScheduler. handleMergeException(Directory dir, java.lang.Throwable exc)
Called when an exception is hit in a background merge threadstatic boolean
DirectoryReader. indexExists(Directory directory)
Returnstrue
if an index likely exists at the specified directory.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.Map<java.lang.String,java.lang.String> readerAttributes)
Returns a IndexReader reading the index in the given Directory(package private) static DirectoryReader
StandardDirectoryReader. open(Directory directory, IndexCommit commit, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
called from DirectoryReader.open(...) methodsstatic DirectoryReader
StandardDirectoryReader. open(Directory directory, SegmentInfos infos, java.util.List<? extends LeafReader> oldReaders, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
This constructor is only used forStandardDirectoryReader.doOpenIfChanged(SegmentInfos)
, as well as NRT replication.(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.static SegmentInfos
SegmentInfos. readCommit(Directory directory, ChecksumIndexInput input, long generation)
Read the commit from the providedChecksumIndexInput
.static SegmentInfos
SegmentInfos. readLatestCommit(Directory directory)
Find the latest commit (segments_N file
) and load allSegmentCommitInfo
s.(package private) void
SegmentInfos. rollbackCommit(Directory dir)
java.lang.String
MergePolicy.MergeSpecification. segString(Directory dir)
Returns a description of the merges in this specification.void
MultiPassIndexSplitter. split(IndexReader in, Directory[] outputs, boolean seq)
Split source index into multiple parts.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)
void
SegmentInfos. write(Directory directory, IndexOutput out)
Write ourselves to the providedIndexOutput
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)
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, InfoStream infoStream, 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.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
.MergeException(java.lang.String message, Directory dir)
Create aMergeException
.MergeException(java.lang.Throwable exc, Directory dir)
Create aMergeException
.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.PKIndexSplitter(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)
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, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
SegmentCoreReaders(Directory dir, SegmentCommitInfo si, boolean openedFromWriter, IOContext context, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
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, 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, boolean openedFromWriter, IOContext context, java.lang.String segmentSuffix, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
Create aSegmentReadState
.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, boolean openedFromWriter, IOContext context, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
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.StandardDirectoryReader(Directory directory, LeafReader[] readers, IndexWriter writer, SegmentInfos sis, boolean applyAllDeletes, boolean writeAllDeletes, java.util.Map<java.lang.String,java.lang.String> readerAttributes)
called only from static open() methodsTrackingTmpOutputDirectoryWrapper(Directory in)
-
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.monitor
Fields in org.apache.lucene.monitor declared as Directory Modifier and Type Field Description private Directory
DocumentBatch.MultiDocumentBatch. directory
-
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
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
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
NativeUnixDirectory
ADirectory
implementation for all Unixes that uses DIRECT I/O to bypass OS level IO caching during merging.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 aRAMDirectory
around any provided delegate directory, to be used during NRT search.class
RAFDirectory
A straightforward implementation ofFSDirectory
using java.io.RandomAccessFile.class
RAMDirectory
Deprecated.This class uses inefficient synchronization and is discouraged in favor ofMMapDirectory
.class
SimpleFSDirectory
A straightforward implementation ofFSDirectory
usingFiles.newByteChannel(Path, java.nio.file.OpenOption...)
.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.class
WindowsDirectory
NativeDirectory
implementation for Microsoft Windows.Fields in org.apache.lucene.store declared as Directory Modifier and Type Field Description private Directory
NativeUnixDirectory. delegate
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
HardlinkCopyDirectoryWrapper. copyFrom(Directory from, java.lang.String srcFile, java.lang.String destFile, IOContext context)
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.HardlinkCopyDirectoryWrapper(Directory in)
Creates a new HardlinkCopyDirectoryWrapper delegating to the given directoryLockValidatingDirectoryWrapper(Directory in, Lock writeLock)
NativeUnixDirectory(java.nio.file.Path path, int mergeBufferSize, long minBytesDirect, LockFactory lockFactory, Directory delegate)
Create a new NIOFSDirectory for the named location.NativeUnixDirectory(java.nio.file.Path path, Directory delegate)
Create a new NIOFSDirectory for the named location withFSLockFactory.getDefault()
.NativeUnixDirectory(java.nio.file.Path path, LockFactory lockFactory, Directory delegate)
Create a new NIOFSDirectory for the named location.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
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.static boolean
IOUtils. spins(Directory dir)
If the dir is anFSDirectory
or wraps one via possibly nestedFilterDirectory
orFileSwitchDirectory
, this returnsIOUtils.spins(Path)
for the wrapped directory, else, true.Constructors in org.apache.lucene.util with parameters of type Directory Constructor Description MergePartitionsTask(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(int numDataDims, int numIndexDims, int bytesPerDim, int maxPointsSortInHeap, Directory tempDir, java.lang.String tempFileNamePrefix)
Sole constructor.BKDWriter(int maxDoc, Directory tempDir, java.lang.String tempFileNamePrefix, int numDataDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode, double maxMBSortInHeap, long totalPointCount)
OfflinePointReader(Directory tempDir, java.lang.String tempFileName, int packedBytesLength, long start, long length, byte[] reusableBuffer)
OfflinePointWriter(Directory tempDir, java.lang.String tempFileNamePrefix, int packedBytesLength, java.lang.String desc, long expectedCount)
Create a new writer with an unknown number of incoming points
-