## 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 and Description
    --- | ---
    `Directory` | SegmentInfo.`dir`
    `Directory` | CheckIndex.Status.`dir` Directory index is in.
    `protected Directory` | ConcurrentMergeScheduler.`dir`
    `protected Directory` | IndexModifier.`directory` Deprecated.

    Methods in org.apache.lucene.index that return Directory
    Modifier and Type | Method and Description
    --- | ---
    `Directory` | SegmentReader.`directory()` Returns the directory this index resides in.
    `Directory` | IndexReader.`directory()` Returns the directory associated with this index.
    `Directory` | FilterIndexReader.`directory()`
    `Directory` | IndexWriter.`getDirectory()` Returns the Directory used by this index.
    `Directory` | MergePolicy.MergeException.`getDirectory()` Returns the `Directory` of the index that hit the exception.
    `abstract Directory` | IndexCommit.`getDirectory()` Returns the `Directory` for the index.

    Methods in org.apache.lucene.index with parameters of type Directory
    Modifier and Type | Method and Description
    --- | ---
    `void` | IndexWriter.`addIndexes(Directory[] dirs)` Deprecated. Use `IndexWriter.addIndexesNoOptimize(org.apache.lucene.store.Directory[])` instead, then separately call `IndexWriter.optimize()` afterwards if you need to.
    `void` | IndexWriter.`addIndexesNoOptimize(Directory[] dirs)` Merges all segments from an array of indexes into this index.
    `static boolean` | CheckIndex.`check(Directory dir, boolean doFix)` Deprecated. Please instantiate a CheckIndex and then use `CheckIndex.checkIndex()` instead
    `static boolean` | CheckIndex.`check(Directory dir, boolean doFix, java.util.List onlySegments)` Deprecated. Please instantiate a CheckIndex and then use `CheckIndex.checkIndex(List)` instead
    `java.util.Collection` | 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 java.util.Map` | IndexReader.`getCommitUserData(Directory directory)` Reads commitUserData, previously passed to `IndexWriter.commit(Map)`, from current index segments file.
    `static java.lang.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.
    `boolean` | SegmentInfos.`hasExternalSegments(Directory dir)`
    `static boolean` | IndexReader.`indexExists(Directory directory)` Returns `true` if an index exists at the specified directory.
    `protected void` | IndexModifier.`init(Directory directory, Analyzer analyzer, boolean create)` Deprecated. Initialize an IndexWriter.
    `static boolean` | IndexWriter.`isLocked(Directory directory)` Returns `true` iff the index in the named directory is currently locked.
    `static boolean` | IndexReader.`isLocked(Directory directory)` Deprecated. Please use `IndexWriter.isLocked(Directory)` instead. This method will be removed in the 3.0 release.
    `static long` | IndexReader.`lastModified(Directory directory2)` Returns the time the index in the named directory was last modified.
    `static java.util.Collection` | IndexReader.`listCommits(Directory dir)` Returns all commit points that exist in the Directory.
    `static IndexReader` | IndexReader.`open(Directory directory)` Deprecated. Use `IndexReader.open(Directory, boolean)` instead This method will be removed in the 3.0 release.
    `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)` Deprecated. Use `IndexReader.open(Directory, IndexDeletionPolicy, boolean)` instead. This method will be removed in the 3.0 release.
    `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, java.lang.String segmentFileName)` Read a particular segmentFileName.
    `static java.util.Map` | SegmentInfos.`readCurrentUserData(Directory directory)` Returns userData from latest segments file
    `static long` | SegmentInfos.`readCurrentVersion(Directory directory)` Current version number from segments file.
    `java.lang.String` | SegmentInfo.`segString(Directory dir)` Used for debugging
    `java.lang.String` | SegmentInfos.`segString(Directory directory)`
    `java.lang.String` | MergePolicy.MergeSpecification.`segString(Directory dir)`
    `static void` | IndexWriter.`unlock(Directory directory)` Forcibly unlocks the index in the named directory.
    `static void` | IndexReader.`unlock(Directory directory)` Deprecated. Please use `IndexWriter.unlock(Directory)` instead. This method will be removed in the 3.0 release.

    Constructors in org.apache.lucene.index with parameters of type Directory
    Constructor and Description
    `CheckIndex(Directory dir)` Create a new CheckIndex on the directory.
    `FindSegmentsFile(Directory directory)`
    `IndexModifier(Directory directory, Analyzer analyzer, boolean create)` Deprecated. Open an index with write access.
    `IndexReader(Directory directory)` Deprecated. - use IndexReader()
    `IndexWriter(Directory d, Analyzer a)` Deprecated. This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
    `IndexWriter(Directory d, Analyzer a, boolean create)` Deprecated. This constructor will be removed in the 3.0 release, and call `IndexWriter.commit()` when needed. Use `IndexWriter.IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)` instead.
    `IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)` Expert: constructs an IndexWriter with a custom `IndexDeletionPolicy`, for the index in `d`.
    `IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)` Constructs an IndexWriter for the index in `d`.
    `IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)` Expert: constructs an IndexWriter with a custom `IndexDeletionPolicy`, for the index in `d`, first creating it if it does not already exist.
    `IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)` Expert: constructs an IndexWriter on specific commit point, with a custom `IndexDeletionPolicy`, for the index in `d`.
    `IndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)` Constructs an IndexWriter for the index in `d`, first creating it if it does not already exist.
    `IndexWriter(Directory d, boolean autoCommit, Analyzer a)` Deprecated. This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
    `IndexWriter(Directory d, boolean autoCommit, Analyzer a, boolean create)` Deprecated. This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
    `IndexWriter(Directory d, boolean autoCommit, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy)` Deprecated. This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,boolean,IndexDeletionPolicy,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
    `IndexWriter(Directory d, boolean autoCommit, Analyzer a, IndexDeletionPolicy deletionPolicy)` Deprecated. This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,IndexDeletionPolicy,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
    `MergeException(java.lang.String message, Directory dir)`
    `MergeException(java.lang.Throwable exc, Directory dir)`
    `SegmentInfo(java.lang.String name, int docCount, Directory dir)`
    `SegmentInfo(java.lang.String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile)`
    `SegmentInfo(java.lang.String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile, int docStoreOffset, java.lang.String docStoreSegment, boolean docStoreIsCompoundFile, boolean hasProx)`

  - ### Uses of Directory in org.apache.lucene.search

    Constructors in org.apache.lucene.search with parameters of type Directory
    Constructor and Description
    `IndexSearcher(Directory directory)` Deprecated. Use `IndexSearcher.IndexSearcher(Directory, boolean)` instead
    `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
    Modifier and Type | Class and Description
    --- | ---
    `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 `SimpleFSDirectory.SimpleFSIndexOutput` 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
    Modifier and Type | Method and Description
    --- | ---
    `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
    Modifier and Type | Method and Description
    --- | ---
    `static void` | Directory.`copy(Directory src, Directory dest, boolean closeDirSrc)` Copy contents of a directory src to a directory dest.

    Constructors in org.apache.lucene.store with parameters of type Directory
    Constructor and Description
    `FileSwitchDirectory(java.util.Set 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
    Modifier and Type | Method and Description
    --- | ---
    `void` | BitVector.`write(Directory d, java.lang.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
    Constructor and Description
    `BitVector(Directory d, java.lang.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-2016 Apache Software Foundation. All Rights Reserved.