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.lucene50 Components from the Lucene 5.0 index format Seeorg.apache.lucene.codecs.lucene80for 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.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.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.codecs
Methods in org.apache.lucene.codecs that return Directory Modifier and Type Method Description abstract DirectoryCompoundFormat. 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 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 DirectoryCompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)Returns a Directory view (read-only) for the compound files in this segmentabstract FieldInfosFieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext iocontext)abstract SegmentInfoSegmentInfoFormat. read(Directory directory, String segmentName, byte[] segmentID, IOContext context)ReadSegmentInfodata 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 voidCompoundFormat. write(Directory dir, SegmentInfo si, IOContext context)Packs the provided segment's files into a compound format.abstract voidFieldInfosFormat. write(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context)Writes the providedFieldInfosto the directory.abstract voidSegmentInfoFormat. write(Directory dir, SegmentInfo info, IOContext ioContext)WriteSegmentInfodata.abstract voidLiveDocsFormat. 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 StoredFieldsReaderCompressingStoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)StoredFieldsWriterCompressingStoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)TermVectorsReaderCompressingTermVectorsFormat. vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)TermVectorsWriterCompressingTermVectorsFormat. 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.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, int blockShift)Sole constructor. -
Uses of Directory in org.apache.lucene.codecs.lucene50
Methods in org.apache.lucene.codecs.lucene50 that return Directory Modifier and Type Method Description DirectoryLucene50CompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)Methods in org.apache.lucene.codecs.lucene50 with parameters of type Directory Modifier and Type Method Description StoredFieldsReaderLucene50StoredFieldsFormat. fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)StoredFieldsWriterLucene50StoredFieldsFormat. fieldsWriter(Directory directory, SegmentInfo si, IOContext context)DirectoryLucene50CompoundFormat. getCompoundReader(Directory dir, SegmentInfo si, IOContext context)FieldInfosLucene50FieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext context)BitsLucene50LiveDocsFormat. readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context)voidLucene50CompoundFormat. write(Directory dir, SegmentInfo si, IOContext context)voidLucene50FieldInfosFormat. write(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context)voidLucene50LiveDocsFormat. writeLiveDocs(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) -
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 FieldInfosLucene60FieldInfosFormat. read(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext context)voidLucene60FieldInfosFormat. write(Directory directory, SegmentInfo segmentInfo, 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 SegmentInfoLucene70SegmentInfoFormat. read(Directory dir, String segment, byte[] segmentID, IOContext context)voidLucene70SegmentInfoFormat. write(Directory dir, SegmentInfo si, IOContext ioContext) -
Uses of Directory in org.apache.lucene.index
Fields in org.apache.lucene.index declared as Directory Modifier and Type Field Description DirectoryCheckIndex.Status. dirDirectory index is in.DirectorySegmentInfo. dirWhere this segment resides.protected DirectoryDirectoryReader. directoryThe index directory.DirectorySegmentReadState. directoryDirectorywhere this segment is read from.DirectorySegmentWriteState. directoryDirectorywhere this segment will be written to.Methods in org.apache.lucene.index that return Directory Modifier and Type Method Description DirectoryDirectoryReader. directory()Returns the directory this index resides in.DirectorySegmentReader. directory()Returns the directory this index resides in.abstract DirectoryIndexCommit. getDirectory()Returns theDirectoryfor the index.DirectoryIndexWriter. getDirectory()Returns the Directory used by this index.DirectoryMergePolicy.MergeException. getDirectory()Returns theDirectoryof the index that hit the exception.DirectoryConcurrentMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)DirectoryMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)Wraps the incomingDirectoryso that we can merge-throttle it usingRateLimitedIndexOutput.DirectoryNoMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)Methods in org.apache.lucene.index with parameters of type Directory Modifier and Type Method Description longIndexWriter. addIndexes(Directory... dirs)Adds all segments from an array of indexes into this index.voidSegmentInfos. commit(Directory dir)Writes and syncs to the Directory dir, taking care to remove the segments file on exceptionstatic 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.protected voidConcurrentMergeScheduler. handleMergeException(Directory dir, Throwable exc)Called when an exception is hit in a background merge threadstatic booleanDirectoryReader. indexExists(Directory directory)Returnstrueif an index likely exists at the specified directory.static List<IndexCommit>DirectoryReader. listCommits(Directory dir)Returns all commit points that exist in the Directory.static DirectoryReaderDirectoryReader. open(Directory directory)Returns a IndexReader reading the index in the given Directorystatic DirectoryReaderDirectoryReader. open(Directory directory, Map<String,String> readerAttributes)Returns a IndexReader reading the index in the given Directorystatic DirectoryReaderStandardDirectoryReader. open(Directory directory, SegmentInfos infos, List<? extends LeafReader> oldReaders, Map<String,String> readerAttributes)This constructor is only used forStandardDirectoryReader.doOpenIfChanged(SegmentInfos), as well as NRT replication.static SegmentInfosSegmentInfos. readCommit(Directory directory, String segmentFileName)Read a particular segmentFileName.static SegmentInfosSegmentInfos. readCommit(Directory directory, ChecksumIndexInput input, long generation)Read the commit from the providedChecksumIndexInput.static SegmentInfosSegmentInfos. readLatestCommit(Directory directory)Find the latest commit (segments_N file) and load allSegmentCommitInfos.StringMergePolicy.MergeSpecification. segString(Directory dir)Returns a description of the merges in this specification.DirectoryConcurrentMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)DirectoryMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)Wraps the incomingDirectoryso that we can merge-throttle it usingRateLimitedIndexOutput.DirectoryNoMergeScheduler. wrapForMerge(MergePolicy.OneMerge merge, Directory in)voidSegmentInfos. write(Directory directory, IndexOutput out)Write ourselves to the providedIndexOutputConstructors 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.DirectoryReader(Directory directory, LeafReader[] segmentReaders)Expert: Constructs aDirectoryReaderon the given subReaders.FindSegmentsFile(Directory directory)Sole constructor.IndexUpgrader(Directory dir)Creates index upgrader on the given directory, using anIndexWriterusing the givenmatchVersion.IndexUpgrader(Directory dir, IndexWriterConfig iwc, boolean deletePriorCommits)Creates index upgrader on the given directory, using anIndexWriterusing the given config.IndexUpgrader(Directory dir, InfoStream 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, Version version, Version minVersion, String name, int maxDoc, boolean isCompoundFile, Codec codec, Map<String,String> diagnostics, byte[] id, Map<String,String> attributes, Sort indexSort)Construct a new complete SegmentInfo instance from input.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, boolean openedFromWriter, IOContext context, String segmentSuffix, Map<String,String> readerAttributes)Create aSegmentReadState.SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, boolean openedFromWriter, IOContext context, Map<String,String> readerAttributes)Create aSegmentReadState.SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context)Sole constructor.SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, 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 classBaseDirectoryBase implementation for a concreteDirectorythat uses aLockFactoryfor locking.classByteBuffersDirectoryAByteBuffer-basedDirectoryimplementation that can be used to store index files on the heap.classFileSwitchDirectoryExpert: A Directory instance that switches files between two other Directory instances.classFilterDirectoryDirectory implementation that delegates calls to another directory.classFSDirectoryBase class for Directory implementations that store index files in the file system.classLockValidatingDirectoryWrapperThis class makes a best-effort check that a providedLockis valid before any destructive filesystem operation.classMMapDirectoryFile-basedDirectoryimplementation that uses mmap for reading, andFSDirectory.FSIndexOutputfor writing.classNIOFSDirectoryAnFSDirectoryimplementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.classNRTCachingDirectoryWraps aRAMDirectoryaround any provided delegate directory, to be used during NRT search.classRAMDirectoryDeprecated.This class uses inefficient synchronization and is discouraged in favor ofMMapDirectory.classSimpleFSDirectoryA straightforward implementation ofFSDirectoryusingFiles.newByteChannel(Path, java.nio.file.OpenOption...).classSleepingLockWrapperDirectory that wraps another, and that sleeps and retries if obtaining the lock fails.classTrackingDirectoryWrapperA 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 DirectoryFilterDirectory. inMethods in org.apache.lucene.store that return Directory Modifier and Type Method Description DirectoryFilterDirectory. getDelegate()Return the wrappedDirectory.DirectoryFileSwitchDirectory. getPrimaryDir()Return the primary directoryDirectoryFileSwitchDirectory. getSecondaryDir()Return the secondary directorystatic DirectoryFilterDirectory. unwrap(Directory dir)Get the wrapped instance bydiras long as this reader is an instance ofFilterDirectory.Methods in org.apache.lucene.store with parameters of type Directory Modifier and Type Method Description voidDirectory. copyFrom(Directory from, String src, String dest, IOContext context)Copies an existingsrcfile from directoryfromto a non-existent filedestin this directory.voidLockValidatingDirectoryWrapper. copyFrom(Directory from, String src, String dest, IOContext context)voidTrackingDirectoryWrapper. copyFrom(Directory from, String src, String dest, IOContext context)LockFSLockFactory. obtainLock(Directory dir, String lockName)abstract LockLockFactory. obtainLock(Directory dir, String lockName)Return a new obtained Lock instance identified by lockName.LockNoLockFactory. obtainLock(Directory dir, String lockName)LockSingleInstanceLockFactory. obtainLock(Directory dir, String lockName)LockVerifyingLockFactory. obtainLock(Directory dir, String lockName)static DirectoryFilterDirectory. unwrap(Directory dir)Get the wrapped instance bydiras long as this reader is an instance ofFilterDirectory.Constructors in org.apache.lucene.store with parameters of type Directory Constructor Description FileSwitchDirectory(Set<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<= maxCachedMBSleepingLockWrapper(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
Methods in org.apache.lucene.util that return Directory Modifier and Type Method Description DirectoryOfflineSorter. getDirectory()Returns theDirectorywe 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 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 voidIOUtils. deleteFiles(Directory dir, Collection<String> names)Deletes all given file names.static voidIOUtils. deleteFilesIgnoringExceptions(Directory dir, String... files)static voidIOUtils. deleteFilesIgnoringExceptions(Directory dir, Collection<String> files)Deletes all given files, suppressing all thrown IOExceptions.static booleanIOUtils. spins(Directory dir)If the dir is anFSDirectoryor wraps one via possibly nestedFilterDirectoryorFileSwitchDirectory, this returnsIOUtils.spins(Path)for the wrapped directory, else, true.Constructors in org.apache.lucene.util with parameters of type Directory Constructor Description OfflineSorter(Directory dir, String tempFileNamePrefix)Defaults constructor.OfflineSorter(Directory dir, String tempFileNamePrefix, Comparator<BytesRef> comparator)Defaults constructor with a custom comparator.OfflineSorter(Directory dir, String tempFileNamePrefix, Comparator<BytesRef> comparator, OfflineSorter.BufferSize ramBufferSize, int maxTempfiles, int valueLength, ExecutorService exec, int maxPartitionsInRAM)All-details constructor. -
Uses of Directory in org.apache.lucene.util.bkd
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, String tempFileNamePrefix)Sole constructor.BKDWriter(int maxDoc, Directory tempDir, String tempFileNamePrefix, int numDataDims, int numIndexDims, int bytesPerDim, int maxPointsInLeafNode, double maxMBSortInHeap, long totalPointCount)OfflinePointReader(Directory tempDir, String tempFileName, int packedBytesLength, long start, long length, byte[] reusableBuffer)OfflinePointWriter(Directory tempDir, String tempFileNamePrefix, int packedBytesLength, String desc, long expectedCount)Create a new writer with an unknown number of incoming points
-