## Uses of Class
org.apache.lucene.store.Directory

Packages that use Directory
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
`protected Directory` `ConcurrentMergeScheduler.dir`
`Directory` `CheckIndex.Status.dir` Directory index is in.
`Directory` `SegmentInfo.dir`
`Directory` `SegmentWriteState.directory`

Methods in org.apache.lucene.index that return Directory
`Directory` `FilterIndexReader.directory()`
`Directory` `IndexReader.directory()` Returns the directory associated with this index.
`Directory` `SegmentReader.directory()` Returns the directory this index resides in.
`abstract Directory` `IndexCommit.getDirectory()` Returns the `Directory` for the index.
`Directory` `IndexWriter.getDirectory()` Returns the Directory used by this index.
`Directory` `MergePolicy.MergeException.getDirectory()` Returns the `Directory` of the index that hit the exception.
`Directory` `CompoundFileWriter.getDirectory()` Returns the directory of the compound file.
`Directory` `SnapshotDeletionPolicy.SnapshotCommitPoint.getDirectory()`

Methods in org.apache.lucene.index with parameters of type Directory
`void` `CompoundFileWriter.addFile(String file, Directory dir)` Same as `CompoundFileWriter.addFile(String)`, only for files that are found in an external `Directory`.
`void` `IndexWriter.addIndexes(Directory... dirs)` Adds all segments from an array of indexes into this index.
`void` `IndexWriter.addIndexesNoOptimize(Directory... dirs)` Deprecated. use `IndexWriter.addIndexes(Directory...)` instead
`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 SegmentReader` `SegmentReader.get(boolean readOnly, Directory dir, SegmentInfo si, int readBufferSize, boolean doOpenStores, int termInfosIndexDivisor)`
`static Map<String,String>` `IndexReader.getCommitUserData(Directory directory)` Reads commitUserData, previously passed to `IndexWriter.commit(Map)`, from current index segments file.
`static String` `SegmentInfos.getCurrentSegmentFileName(Directory directory)` Get the filename of the current segments_N file in the directory.
`static long` `SegmentInfos.getCurrentSegmentGeneration(Directory directory)` Get the generation (N) of the current segments_N file in the directory.
`static long` `IndexReader.getCurrentVersion(Directory directory)` Reads version number from segments files.
`abstract PayloadProcessorProvider.DirPayloadProcessor` `PayloadProcessorProvider.getDirProcessor(Directory dir)` Returns a `PayloadProcessorProvider.DirPayloadProcessor` for the given `Directory`, through which `PayloadProcessorProvider.DirPayloadProcessor`s can be obtained for each `Term`, or `null` if none should be used.
`static boolean` `IndexReader.indexExists(Directory directory)` Returns `true` if an index exists at the specified directory.
`static boolean` `IndexWriter.isLocked(Directory directory)` Returns `true` iff the index in the named directory is currently locked.
`static long` `IndexReader.lastModified(Directory directory2)` Returns the time the index in the named directory was last modified.
`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)` Returns an IndexReader reading the index in the given Directory.
`static IndexReader` `IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly)` Expert: returns an IndexReader reading the index in the given Directory, with a custom `IndexDeletionPolicy`.
`static IndexReader` `IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)` Expert: returns an IndexReader reading the index in the given Directory, with a custom `IndexDeletionPolicy`.
`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 Map<String,String>` `SegmentInfos.readCurrentUserData(Directory directory)` Returns userData from latest segments file
`static long` `SegmentInfos.readCurrentVersion(Directory directory)` Current version number from segments file.
`static Map<String,String>` `PersistentSnapshotDeletionPolicy.readSnapshotsInfo(Directory dir)` Reads the snapshots information from the given `Directory`.
`String` `MergePolicy.OneMerge.segString(Directory dir)`
`String` `MergePolicy.MergeSpecification.segString(Directory dir)`
`String` `SegmentInfos.toString(Directory directory)`
`String` `SegmentInfo.toString(Directory dir, int pendingDelCount)` Used for debugging.
`static void` `IndexWriter.unlock(Directory directory)` Forcibly unlocks the index in the named directory.

Constructors in org.apache.lucene.index with parameters of type Directory
`CheckIndex(Directory dir)` Create a new CheckIndex on the directory.
`CompoundFileWriter(Directory dir, String name)` Create the compound stream in the specified file.
`IndexUpgrader(Directory dir, IndexWriterConfig iwc, PrintStream infoStream, boolean deletePriorCommits)` Creates index upgrader on the given directory, using an `IndexWriter` using the given config.
`IndexUpgrader(Directory dir, Version matchVersion)` Creates index upgrader on the given directory, using an `IndexWriter` using the given `matchVersion`.
`IndexUpgrader(Directory dir, Version matchVersion, PrintStream infoStream, boolean deletePriorCommits)` Creates index upgrader on the given directory, using an `IndexWriter` using the given `matchVersion`.
`IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)` Deprecated. use `IndexWriter.IndexWriter(Directory, IndexWriterConfig)` instead
`IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)` Deprecated. use `IndexWriter.IndexWriter(Directory, IndexWriterConfig)` instead
`IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)` Deprecated. use `IndexWriter.IndexWriter(Directory, IndexWriterConfig)` instead
`IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)` Deprecated. use `IndexWriter.IndexWriter(Directory, IndexWriterConfig)` instead
`IndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)` Deprecated. use `IndexWriter.IndexWriter(Directory, IndexWriterConfig)` instead
`IndexWriter(Directory d, IndexWriterConfig conf)` Constructs a new IndexWriter per the settings given in `conf`.
`MergePolicy.MergeException(String message, Directory dir)`
`MergePolicy.MergeException(Throwable exc, Directory dir)`
`PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)` `PersistentSnapshotDeletionPolicy` wraps another `IndexDeletionPolicy` to enable flexible snapshotting.
`SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile, boolean hasProx, boolean hasVectors)`
`SegmentInfos.FindSegmentsFile(Directory directory)`
`SegmentWriteState(PrintStream infoStream, Directory directory, String segmentName, org.apache.lucene.index.FieldInfos fieldInfos, int numDocs, int termIndexInterval, org.apache.lucene.index.BufferedDeletes segDeletes)`

Uses of Directory in org.apache.lucene.search

Constructors in org.apache.lucene.search with parameters of type Directory
`IndexSearcher(Directory path)` Creates a searcher searching the index in the named directory, with readOnly=true
`IndexSearcher(Directory path, boolean readOnly)` Creates a searcher searching the index in the named directory.

Uses of Directory in org.apache.lucene.store

Subclasses of Directory in org.apache.lucene.store
`class` `FileSwitchDirectory` Expert: A Directory instance that switches files between two other Directory instances.
`class` `FSDirectory` Base class for Directory implementations that store index files in the file system.
`class` `MMapDirectory` File-based `Directory` implementation that uses mmap for reading, and `FSDirectory.FSIndexOutput` for writing.
`class` `NIOFSDirectory` An `FSDirectory` implementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.
`class` `RAMDirectory` A memory-resident `Directory` implementation.
`class` `SimpleFSDirectory` A straightforward implementation of `FSDirectory` using java.io.RandomAccessFile.

Methods in org.apache.lucene.store that return Directory
`Directory` `FileSwitchDirectory.getPrimaryDir()` Return the primary directory
`Directory` `FileSwitchDirectory.getSecondaryDir()` Return the secondary directory

Methods in org.apache.lucene.store with parameters of type Directory

`static void`

`Directory.copy(Directory src, Directory dest, boolean closeDirSrc)`
Deprecated. should be replaced with calls to `copy(Directory, String, String)` for every file that needs copying. You can use the following code:

     IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
     for (String file : src.listAll()) {
       if (filter.accept(null, file)) {
         src.copy(dest, file, file);
       }
     }

`void` `Directory.copy(Directory to, String src, String dest)` Copies the file src to `Directory` to under the new file name dest.

Constructors in org.apache.lucene.store with parameters of type Directory
`FileSwitchDirectory(Set<String> primaryExtensions, Directory primaryDir, Directory secondaryDir, boolean doClose)`
`RAMDirectory(Directory dir)` Creates a new `RAMDirectory` instance from a different `Directory` implementation.

Uses of Directory in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type Directory
`void` `BitVector.write(Directory d, String name)` Writes this vector to the file `name` in Directory `d`, in a format that can be read by the constructor `BitVector.BitVector(Directory, String)`.

Constructors in org.apache.lucene.util with parameters of type Directory
`BitVector(Directory d, String name)` Constructs a bit vector from the file `name` in Directory `d`, as written by the `BitVector.write(org.apache.lucene.store.Directory, java.lang.String)` method.

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.