Uses of Class
org.apache.lucene.store.Directory
Packages that use Directory
Package
Description
Codecs API: API for customization of the encoding and structure of the index.
StoredFieldsFormat that allows cross-document and cross-field compression of stored fields.
Codec to support Lucene 3.x indexes (readonly)
Lucene 4.0 file format.
Lucene 4.1 file format.
Lucene 4.6 file format.
Code to maintain and access indices.
Code to search indices.
Binary i/o API, used for all index data.
Some utility classes.
-
Uses of Directory in org.apache.lucene.codecs
Methods in org.apache.lucene.codecs with parameters of type DirectoryModifier and TypeMethodDescriptionabstract StoredFieldsReaderStoredFieldsFormat.fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) Returns aStoredFieldsReaderto load stored fields.abstract StoredFieldsWriterStoredFieldsFormat.fieldsWriter(Directory directory, SegmentInfo si, IOContext context) Returns aStoredFieldsWriterto write stored fields.abstract FieldInfosFieldInfosReader.read(Directory directory, String segmentName, String segmentSuffix, IOContext iocontext) Read theFieldInfospreviously written withFieldInfosWriter.abstract SegmentInfoReadSegmentInfodata from a directory.abstract BitsLiveDocsFormat.readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context) Read live docs bits.abstract TermVectorsReaderTermVectorsFormat.vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) Returns aTermVectorsReaderto read term vectors.abstract TermVectorsWriterTermVectorsFormat.vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context) Returns aTermVectorsWriterto write term vectors.abstract voidFieldInfosWriter.write(Directory directory, String segmentName, String segmentSuffix, FieldInfos infos, IOContext context) Writes the providedFieldInfosto the directory.abstract voidSegmentInfoWriter.write(Directory dir, SegmentInfo info, FieldInfos fis, IOContext ioContext) WriteSegmentInfodata.abstract voidLiveDocsFormat.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 DirectoryModifierConstructorDescriptionBlockTreeTermsReader(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 DirectoryModifier and TypeMethodDescriptionCompressingStoredFieldsFormat.fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) CompressingStoredFieldsFormat.fieldsWriter(Directory directory, SegmentInfo si, IOContext context) final TermVectorsReaderCompressingTermVectorsFormat.vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) final TermVectorsWriterCompressingTermVectorsFormat.vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context) Constructors in org.apache.lucene.codecs.compressing with parameters of type DirectoryModifierConstructorDescriptionCompressingStoredFieldsReader(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 DirectoryModifier and TypeMethodDescriptionDeprecated.static voidLucene3xSegmentInfoReader.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 DirectoryModifier and TypeMethodDescriptionLucene40StoredFieldsFormat.fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) Lucene40StoredFieldsFormat.fieldsWriter(Directory directory, SegmentInfo si, IOContext context) Deprecated.Lucene40LiveDocsFormat.readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context) Lucene40TermVectorsFormat.vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context) Lucene40TermVectorsFormat.vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context) voidLucene40SegmentInfoWriter.write(Directory dir, SegmentInfo si, FieldInfos fis, IOContext ioContext) Deprecated.Save a single segment's info.voidLucene40LiveDocsFormat.writeLiveDocs(MutableBits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) Constructors in org.apache.lucene.codecs.lucene40 with parameters of type DirectoryModifierConstructorDescriptionLucene40PostingsReader(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 DirectoryModifierConstructorDescriptionLucene41PostingsReader(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 DirectoryModifier and TypeMethodDescriptionvoidLucene46SegmentInfoWriter.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 DirectoryModifier and TypeFieldDescriptionCheckIndex.Status.dirDirectory index is in.protected DirectoryConcurrentMergeScheduler.dirDirectorythat holds the index.final DirectorySegmentInfo.dirWhere this segment resides.protected final DirectoryDirectoryReader.directoryThe index directory.final DirectorySegmentReadState.directoryDirectorywhere this segment is read from.final DirectorySegmentWriteState.directoryDirectorywhere this segment will be written to.Methods in org.apache.lucene.index that return DirectoryModifier and TypeMethodDescriptionfinal DirectoryDirectoryReader.directory()Returns the directory this index resides in.SegmentReader.directory()Returns the directory this index resides in.abstract DirectoryIndexCommit.getDirectory()Returns theDirectoryfor the index.IndexWriter.getDirectory()Returns the Directory used by this index.MergePolicy.MergeException.getDirectory()Returns theDirectoryof the index that hit the exception.Methods in org.apache.lucene.index with parameters of type DirectoryModifier and TypeMethodDescriptionvoidIndexWriter.addIndexes(Directory... dirs) Adds all segments from an array of indexes into this index.longTrackingIndexWriter.addIndexes(Directory... dirs) CallsIndexWriter.addIndexes(Directory...)and returns the generation that reflects this change.voidMergePolicy.OneMerge.checkAborted(Directory dir) Called periodically byIndexWriterwhile merging to see if the merge is aborted.Returns all file names referenced by SegmentInfo instances matching the provided Directory (ie files associated with any "external" segments are skipped).static longSegmentInfos.getLastCommitGeneration(Directory directory) Get the generation of the most recent commit to the index in this directory (N in the segments_N file).static StringSegmentInfos.getLastCommitSegmentsFileName(Directory directory) Get the filename of the segments_N file for the most recent commit to the index in this Directory.static booleanDirectoryReader.indexExists(Directory directory) Returnstrueif an index likely exists at the specified directory.static booleanReturnstrueiff 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 DirectoryReaderReturns a IndexReader reading the index in the given Directorystatic DirectoryReaderExpert: Returns a IndexReader reading the index in the given Directory with the given termInfosIndexDivisor.static DirectoryReaderDeprecated.static DirectoryReaderDeprecated.final voidFind the latest commit (segments_N file) and load allSegmentCommitInfos.final voidRead a particular segmentFileName.Returns a description of the merges in this specification.Returns a readable description of the current merge state.Returns a description of this segment.Used for debugging.Returns readable description of this segment.static voidForcibly unlocks the index in the named directory.static StringSegmentInfos.write3xInfo(Directory dir, SegmentInfo si, IOContext context) Deprecated.static voidSegmentInfos.writeSegmentsGen(Directory dir, long generation) A utility for writing theIndexFileNames.SEGMENTS_GENfile to aDirectory.Constructors in org.apache.lucene.index with parameters of type DirectoryModifierConstructorDescriptionCheckAbort(MergePolicy.OneMerge merge, Directory dir) Creates a #CheckAbort instance.CheckIndex(Directory dir) Create a new CheckIndex on the directory.protectedDirectoryReader(Directory directory, AtomicReader[] segmentReaders) Expert: Constructs aDirectoryReaderon the given subReaders.FindSegmentsFile(Directory directory) Sole constructor.IndexUpgrader(Directory dir, IndexWriterConfig iwc, boolean deletePriorCommits) Creates index upgrader on the given directory, using anIndexWriterusing the given config.IndexUpgrader(Directory dir, Version matchVersion) Creates index upgrader on the given directory, using anIndexWriterusing the givenmatchVersion.IndexUpgrader(Directory dir, Version matchVersion, PrintStream infoStream, boolean deletePriorCommits) Creates index upgrader on the given directory, using anIndexWriterusing 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) PersistentSnapshotDeletionPolicywraps anotherIndexDeletionPolicyto enable flexible snapshotting, passingIndexWriterConfig.OpenMode.CREATE_OR_APPENDby default.PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode) PersistentSnapshotDeletionPolicywraps anotherIndexDeletionPolicyto 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 DirectoryModifierConstructorDescriptionSearcherManager(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.storeModifier and TypeClassDescriptionclassBase implementation for a concreteDirectory.final classClass for accessing a compound stream.classExpert: A Directory instance that switches files between two other Directory instances.classDirectory implementation that delegates calls to another directory.classBase class for Directory implementations that store index files in the file system.classFile-basedDirectoryimplementation that uses mmap for reading, andFSDirectory.FSIndexOutputfor writing.classAnFSDirectoryimplementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.classWraps aRAMDirectoryaround any provided delegate directory, to be used during NRT search.classA memory-residentDirectoryimplementation.final classclassA straightforward implementation ofFSDirectoryusing java.io.RandomAccessFile.final classA delegating Directory that records which files were written to and deleted.Fields in org.apache.lucene.store declared as DirectoryMethods in org.apache.lucene.store that return DirectoryModifier and TypeMethodDescriptionfinal DirectoryFilterDirectory.getDelegate()Return the wrappedDirectory.NRTCachingDirectory.getDelegate()CompoundFileDirectory.getDirectory()FileSwitchDirectory.getPrimaryDir()Return the primary directoryFileSwitchDirectory.getSecondaryDir()Return the secondary directoryMethods in org.apache.lucene.store with parameters of type DirectoryModifier and TypeMethodDescriptionvoidCopies the file src toDirectoryto under the new file name dest.voidvoidConstructors in org.apache.lucene.store with parameters of type DirectoryModifierConstructorDescriptionCompoundFileDirectory(Directory directory, String fileName, IOContext context, boolean openForWrite) Create a new CompoundFileDirectory.FileSwitchDirectory(Set<String> primaryExtensions, Directory primaryDir, Directory secondaryDir, boolean doClose) protectedSole 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 newRAMDirectoryinstance from a differentDirectoryimplementation.RateLimitedDirectoryWrapper(Directory wrapped) -
Uses of Directory in org.apache.lucene.util
Methods in org.apache.lucene.util that return types with arguments of type DirectoryModifier and TypeMethodDescriptionCommandLineUtil.loadDirectoryClass(String clazzName) Loads a specific Directory implementationMethods in org.apache.lucene.util with parameters of type DirectoryModifier and TypeMethodDescriptionstatic voidIOUtils.deleteFilesIgnoringExceptions(Directory dir, String... files) Deletes all given files, suppressing all thrown IOExceptions.
DirectoryReader.open(Directory)