Uses of Class
org.apache.lucene.store.Directory
-
Packages that use Directory Package Description 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.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
SegmentInfo. dir
Directory
SegmentWriteState. directory
Methods in org.apache.lucene.index that return Directory Modifier and Type Method Description Directory
FilterIndexReader. directory()
Directory
IndexReader. directory()
Returns the directory associated with this index.Directory
SegmentReader. directory()
Returns the directory this index resides in.Directory
CompoundFileWriter. getDirectory()
Returns the directory of the compound file.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.Directory
SnapshotDeletionPolicy.SnapshotCommitPoint. getDirectory()
Methods in org.apache.lucene.index with parameters of type Directory Modifier and Type Method Description void
CompoundFileWriter. addFile(String file, Directory dir)
Same asCompoundFileWriter.addFile(String)
, only for files that are found in an externalDirectory
.void
IndexWriter. addIndexes(Directory... dirs)
Adds all segments from an array of indexes into this index.void
IndexWriter. addIndexesNoOptimize(Directory... dirs)
Deprecated.useIndexWriter.addIndexes(Directory...)
insteadCollection<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 SegmentReader
SegmentReader. get(boolean readOnly, Directory dir, SegmentInfo si, int readBufferSize, boolean doOpenStores, int termInfosIndexDivisor)
static Map<String,String>
IndexReader. getCommitUserData(Directory directory)
Deprecated.CallIndexReader.getIndexCommit()
on an open IndexReader, and then callIndexCommit.getUserData()
.static long
IndexReader. getCurrentVersion(Directory directory)
Deprecated.UseIndexReader.getVersion()
on an opened IndexReader.PayloadProcessorProvider.DirPayloadProcessor
PayloadProcessorProvider. getDirProcessor(Directory dir)
Deprecated.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
IndexReader. indexExists(Directory directory)
Returnstrue
if an index exists at the specified directory.static boolean
IndexWriter. isLocked(Directory directory)
Returnstrue
iff the index in the named directory is currently locked.static long
IndexReader. lastModified(Directory directory2)
Deprecated.If you need to track commit time of an index, you can store it in the commit data (seeIndexWriter.commit(Map)
static Collection<IndexCommit>
IndexReader. listCommits(Directory dir)
Returns all commit points that exist in the Directory.static IndexReader
IndexReader. open(Directory directory)
Returns a IndexReader reading the index in the given Directory, with readOnly=true.static IndexReader
IndexReader. open(Directory directory, boolean readOnly)
Deprecated.Write support will be removed in Lucene 4.0.static IndexReader
IndexReader. open(Directory directory, int termInfosIndexDivisor)
Expert: Returns a IndexReader reading the index in the given Director and given termInfosIndexDivisorstatic IndexReader
IndexReader. open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated.Write support will be removed in Lucene 4.0.static IndexReader
IndexReader. open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated.Write support will be removed in Lucene 4.0.void
SegmentInfos. read(Directory directory)
This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.void
SegmentInfos. read(Directory directory, String segmentFileName)
Read a particular segmentFileName.static long
SegmentInfos. readCurrentVersion(Directory directory)
Deprecated.Load the SegmentInfos and then callSegmentInfos.getVersion()
.static Map<String,String>
PersistentSnapshotDeletionPolicy. readSnapshotsInfo(Directory dir)
Reads the snapshots information from the givenDirectory
.String
MergePolicy.MergeSpecification. segString(Directory dir)
String
MergePolicy.OneMerge. segString(Directory dir)
String
SegmentInfo. toString(Directory dir, int pendingDelCount)
Used for debugging.String
SegmentInfos. toString(Directory directory)
static void
IndexWriter. unlock(Directory directory)
Forcibly unlocks the index in the named directory.void
FieldInfos. write(Directory d, String name)
Constructors in org.apache.lucene.index with parameters of type Directory Constructor Description CheckIndex(Directory dir)
Create a new CheckIndex on the directory.CompoundFileWriter(Directory dir, String name)
Create the compound stream in the specified file.FieldInfos(Directory d, String name)
Construct a FieldInfos object using the directory and the name of the file IndexInputFindSegmentsFile(Directory directory)
IndexUpgrader(Directory dir, IndexWriterConfig iwc, PrintStream infoStream, 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, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated.useIndexWriter(Directory, IndexWriterConfig)
insteadIndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)
Deprecated.useIndexWriter(Directory, IndexWriterConfig)
insteadIndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated.useIndexWriter(Directory, IndexWriterConfig)
insteadIndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated.useIndexWriter(Directory, IndexWriterConfig)
insteadIndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)
Deprecated.useIndexWriter(Directory, IndexWriterConfig)
insteadIndexWriter(Directory d, IndexWriterConfig conf)
Constructs a new IndexWriter per the settings given inconf
.MergeException(String message, Directory dir)
MergeException(Throwable exc, Directory dir)
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)
PersistentSnapshotDeletionPolicy
wraps anotherIndexDeletionPolicy
to enable flexible snapshotting.SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile, boolean hasProx, boolean hasVectors)
SegmentWriteState(PrintStream infoStream, Directory directory, String segmentName, FieldInfos fieldInfos, int numDocs, int termIndexInterval, org.apache.lucene.index.BufferedDeletes segDeletes)
-
Uses of Directory in org.apache.lucene.search
Methods in org.apache.lucene.search with parameters of type Directory Modifier and Type Method Description long
NRTManager.TrackingIndexWriter. addIndexes(Directory... dirs)
Constructors in org.apache.lucene.search with parameters of type Directory Constructor Description IndexSearcher(Directory path)
Deprecated.useIndexSearcher(IndexReader)
instead.IndexSearcher(Directory path, boolean readOnly)
Deprecated.UseIndexSearcher(IndexReader)
instead.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
FileSwitchDirectory
Expert: A Directory instance that switches files between two other Directory instances.class
FSDirectory
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
SimpleFSDirectory
A straightforward implementation ofFSDirectory
using java.io.RandomAccessFile.Methods in org.apache.lucene.store that return Directory Modifier and Type Method Description 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)
Copies the file src toDirectory
to under the new file name dest.static void
Directory. copy(Directory src, Directory dest, boolean closeDirSrc)
Deprecated.should be replaced with calls tocopy(Directory, String, String)
for every file that needs copying.Constructors in org.apache.lucene.store with parameters of type Directory Constructor Description FileSwitchDirectory(Set<String> primaryExtensions, Directory primaryDir, Directory secondaryDir, boolean doClose)
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)
Creates a newRAMDirectory
instance from a differentDirectory
implementation. -
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 void
BitVector. write(Directory d, String name)
Writes this vector to the filename
in Directoryd
, in a format that can be read by the constructorBitVector(Directory, String)
.Constructors in org.apache.lucene.util with parameters of type Directory Constructor Description BitVector(Directory d, String name)
Constructs a bit vector from the filename
in Directoryd
, as written by theBitVector.write(org.apache.lucene.store.Directory, java.lang.String)
method.
-