Uses of Class
org.apache.lucene.store.Directory
-
Packages that use Directory Package Description 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.lucene3x Codec to support Lucene 3.x indexes (readonly)org.apache.lucene.codecs.lucene40 Lucene 4.0 file format.org.apache.lucene.codecs.lucene41 Lucene 4.1 file format.org.apache.lucene.codecs.lucene46 Lucene 4.6 file format.org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.search Code to search indices.org.apache.lucene.store Binary i/o API, used for all index data.org.apache.lucene.util Some utility classes. -
-
Uses of Directory in org.apache.lucene.codecs
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 FieldInfos
FieldInfosReader. read(Directory directory, String segmentName, String segmentSuffix, IOContext iocontext)
Read theFieldInfos
previously written withFieldInfosWriter
.abstract SegmentInfo
SegmentInfoReader. read(Directory directory, String segmentName, 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
FieldInfosWriter. write(Directory directory, String segmentName, String segmentSuffix, FieldInfos infos, IOContext context)
Writes the providedFieldInfos
to the directory.abstract void
SegmentInfoWriter. write(Directory dir, SegmentInfo info, FieldInfos fis, IOContext ioContext)
WriteSegmentInfo
data.abstract void
LiveDocsFormat. writeLiveDocs(MutableBits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context)
Persist live docs bits.Constructors in org.apache.lucene.codecs with parameters of type Directory Constructor Description BlockTreeTermsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo info, PostingsReaderBase postingsReader, IOContext ioContext, String segmentSuffix, int indexDivisor)
Sole constructor. -
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, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode)
Sole constructor.CompressingStoredFieldsWriter(Directory directory, SegmentInfo si, String segmentSuffix, IOContext context, String formatName, CompressionMode compressionMode, int chunkSize)
Sole constructor.CompressingTermVectorsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode)
Sole constructor.CompressingTermVectorsWriter(Directory directory, SegmentInfo si, String segmentSuffix, IOContext context, String formatName, CompressionMode compressionMode, int chunkSize)
Sole constructor. -
Uses of Directory in org.apache.lucene.codecs.lucene3x
Methods in org.apache.lucene.codecs.lucene3x with parameters of type Directory Modifier and Type Method Description SegmentInfo
Lucene3xSegmentInfoReader. read(Directory directory, String segmentName, IOContext context)
Deprecated.static void
Lucene3xSegmentInfoReader. readLegacyInfos(SegmentInfos infos, Directory directory, IndexInput input, int format)
Deprecated. -
Uses of Directory in org.apache.lucene.codecs.lucene40
Methods in org.apache.lucene.codecs.lucene40 with parameters of type Directory Modifier and Type Method Description StoredFieldsReader
Lucene40StoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
StoredFieldsWriter
Lucene40StoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)
SegmentInfo
Lucene40SegmentInfoReader. read(Directory dir, String segment, IOContext context)
Deprecated.Bits
Lucene40LiveDocsFormat. readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context)
TermVectorsReader
Lucene40TermVectorsFormat. vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)
TermVectorsWriter
Lucene40TermVectorsFormat. vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)
void
Lucene40SegmentInfoWriter. write(Directory dir, SegmentInfo si, FieldInfos fis, IOContext ioContext)
Deprecated.Save a single segment's info.void
Lucene40LiveDocsFormat. writeLiveDocs(MutableBits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context)
Constructors in org.apache.lucene.codecs.lucene40 with parameters of type Directory Constructor Description Lucene40PostingsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo segmentInfo, IOContext ioContext, String segmentSuffix)
Deprecated.Sole constructor.Lucene40StoredFieldsReader(Directory d, SegmentInfo si, FieldInfos fn, IOContext context)
Sole constructor.Lucene40StoredFieldsWriter(Directory directory, String segment, IOContext context)
Sole constructor.Lucene40TermVectorsReader(Directory d, SegmentInfo si, FieldInfos fieldInfos, IOContext context)
Sole constructor.Lucene40TermVectorsWriter(Directory directory, String segment, IOContext context)
Sole constructor. -
Uses of Directory in org.apache.lucene.codecs.lucene41
Constructors in org.apache.lucene.codecs.lucene41 with parameters of type Directory Constructor Description Lucene41PostingsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo segmentInfo, IOContext ioContext, String segmentSuffix)
Sole constructor. -
Uses of Directory in org.apache.lucene.codecs.lucene46
Methods in org.apache.lucene.codecs.lucene46 with parameters of type Directory Modifier and Type Method Description SegmentInfo
Lucene46SegmentInfoReader. read(Directory dir, String segment, IOContext context)
void
Lucene46SegmentInfoWriter. write(Directory dir, SegmentInfo si, FieldInfos fis, IOContext ioContext)
Save a single segment's info. -
Uses of Directory in org.apache.lucene.index
Fields in org.apache.lucene.index declared as Directory Modifier and Type Field Description Directory
CheckIndex.Status. dir
Directory index is in.protected Directory
ConcurrentMergeScheduler. dir
Directory
that holds the index.Directory
SegmentInfo. dir
Where this segment resides.protected Directory
DirectoryReader. directory
The index directory.Directory
SegmentReadState. directory
Directory
where this segment is read from.Directory
SegmentWriteState. directory
Directory
where this segment will be written to.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
IndexWriter. getDirectory()
Returns the Directory used by this index.Directory
MergePolicy.MergeException. getDirectory()
Returns theDirectory
of the index that hit the exception.Methods in org.apache.lucene.index with parameters of type Directory Modifier and Type Method Description void
IndexWriter. addIndexes(Directory... dirs)
Adds all segments from an array of indexes into this index.long
TrackingIndexWriter. addIndexes(Directory... dirs)
CallsIndexWriter.addIndexes(Directory...)
and returns the generation that reflects this change.void
MergePolicy.OneMerge. checkAborted(Directory dir)
Called periodically byIndexWriter
while merging to see if the merge is aborted.Collection<String>
SegmentInfos. files(Directory dir, boolean includeSegmentsFile)
Returns all file names referenced by SegmentInfo instances matching the provided Directory (ie files associated with any "external" segments are skipped).static long
SegmentInfos. getLastCommitGeneration(Directory directory)
Get the generation of the most recent commit to the index in this directory (N in the segments_N file).static String
SegmentInfos. getLastCommitSegmentsFileName(Directory directory)
Get the filename of the segments_N file for the most recent commit to the index in this Directory.static boolean
DirectoryReader. indexExists(Directory directory)
Returnstrue
if an index likely exists at the specified directory.static boolean
IndexWriter. isLocked(Directory directory)
Returnstrue
iff the index in the named directory is currently locked.static List<IndexCommit>
DirectoryReader. listCommits(Directory dir)
Returns all commit points that exist in the Directory.static DirectoryReader
DirectoryReader. open(Directory directory)
Returns a IndexReader reading the index in the given Directorystatic DirectoryReader
DirectoryReader. open(Directory directory, int termInfosIndexDivisor)
Expert: Returns a IndexReader reading the index in the given Directory with the given termInfosIndexDivisor.static DirectoryReader
IndexReader. open(Directory directory)
Deprecated.static DirectoryReader
IndexReader. open(Directory directory, int termInfosIndexDivisor)
Deprecated.void
SegmentInfos. read(Directory directory)
Find the latest commit (segments_N file
) and load allSegmentCommitInfo
s.void
SegmentInfos. read(Directory directory, String segmentFileName)
Read a particular segmentFileName.String
MergePolicy.MergeSpecification. segString(Directory dir)
Returns a description of the merges in this specification.String
MergePolicy.OneMerge. segString(Directory dir)
Returns a readable description of the current merge state.String
SegmentCommitInfo. toString(Directory dir, int pendingDelCount)
Returns a description of this segment.String
SegmentInfo. toString(Directory dir, int delCount)
Used for debugging.String
SegmentInfos. toString(Directory directory)
Returns readable description of this segment.static void
IndexWriter. unlock(Directory directory)
Forcibly unlocks the index in the named directory.static String
SegmentInfos. write3xInfo(Directory dir, SegmentInfo si, IOContext context)
Deprecated.static void
SegmentInfos. writeSegmentsGen(Directory dir, long generation)
A utility for writing theIndexFileNames.SEGMENTS_GEN
file to aDirectory
.Constructors in org.apache.lucene.index with parameters of type Directory Constructor Description CheckAbort(MergePolicy.OneMerge merge, Directory dir)
Creates a #CheckAbort instance.CheckIndex(Directory dir)
Create a new CheckIndex on the directory.DirectoryReader(Directory directory, AtomicReader[] segmentReaders)
Expert: Constructs aDirectoryReader
on the given subReaders.FindSegmentsFile(Directory directory)
Sole constructor.IndexUpgrader(Directory dir, IndexWriterConfig iwc, boolean deletePriorCommits)
Creates index upgrader on the given directory, using anIndexWriter
using the given config.IndexUpgrader(Directory dir, Version matchVersion)
Creates index upgrader on the given directory, using anIndexWriter
using the givenmatchVersion
.IndexUpgrader(Directory dir, Version matchVersion, PrintStream 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(String message, Directory dir)
Create aMergeException
.MergeException(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.ReaderManager(Directory dir)
Creates and returns a new ReaderManager from the givenDirectory
.SegmentInfo(Directory dir, String version, String name, int docCount, boolean isCompoundFile, Codec codec, Map<String,String> diagnostics)
Construct a new complete SegmentInfo instance from input.SegmentInfo(Directory dir, String version, String name, int docCount, boolean isCompoundFile, Codec codec, Map<String,String> diagnostics, Map<String,String> attributes)
Construct a new complete SegmentInfo instance from input.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, int termsIndexDivisor)
Create aSegmentReadState
.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, int termsIndexDivisor, String segmentSuffix)
Create aSegmentReadState
.SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, int termIndexInterval, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context)
Sole constructor.SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, int termIndexInterval, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context, String segmentSuffix)
Constructor which takes segment suffix. -
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.store
Subclasses of Directory in org.apache.lucene.store Modifier and Type Class Description class
BaseDirectory
Base implementation for a concreteDirectory
.class
CompoundFileDirectory
Class for accessing a compound stream.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
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 aRAMDirectory
around any provided delegate directory, to be used during NRT search.class
RAMDirectory
A memory-residentDirectory
implementation.class
RateLimitedDirectoryWrapper
class
SimpleFSDirectory
A straightforward implementation ofFSDirectory
using java.io.RandomAccessFile.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
Methods in org.apache.lucene.store that return Directory Modifier and Type Method Description Directory
FilterDirectory. getDelegate()
Return the wrappedDirectory
.Directory
NRTCachingDirectory. getDelegate()
Directory
CompoundFileDirectory. getDirectory()
Directory
FileSwitchDirectory. getPrimaryDir()
Return the primary directoryDirectory
FileSwitchDirectory. getSecondaryDir()
Return the secondary directoryMethods in org.apache.lucene.store with parameters of type Directory Modifier and Type Method Description void
Directory. copy(Directory to, String src, String dest, IOContext context)
Copies the file src toDirectory
to under the new file name dest.void
RateLimitedDirectoryWrapper. copy(Directory to, String src, String dest, IOContext context)
void
TrackingDirectoryWrapper. copy(Directory to, String src, String dest, IOContext context)
Constructors in org.apache.lucene.store with parameters of type Directory Constructor Description CompoundFileDirectory(Directory directory, String fileName, IOContext context, boolean openForWrite)
Create a new CompoundFileDirectory.FileSwitchDirectory(Set<String> primaryExtensions, Directory primaryDir, Directory secondaryDir, boolean doClose)
FilterDirectory(Directory in)
Sole constructor, typically called from sub-classes.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 <= maxCachedMBRAMDirectory(Directory dir, IOContext context)
Creates a newRAMDirectory
instance from a differentDirectory
implementation.RateLimitedDirectoryWrapper(Directory wrapped)
TrackingDirectoryWrapper(Directory in)
-
Uses of Directory in org.apache.lucene.util
Methods in org.apache.lucene.util that return types with arguments of type Directory Modifier and Type Method Description static Class<? extends Directory>
CommandLineUtil. loadDirectoryClass(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. deleteFilesIgnoringExceptions(Directory dir, String... files)
Deletes all given files, suppressing all thrown IOExceptions.
-