Package | Description |
---|---|
org.apache.lucene.analysis.hunspell |
Stemming TokenFilter using a Java implementation of the
Hunspell stemming algorithm.
|
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
See
org.apache.lucene.codecs.lucene80 for 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.misc |
Miscellaneous index tools.
|
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.
|
Modifier and Type | Method and Description |
---|---|
private void |
Dictionary.readDictionaryFiles(Directory tempDir,
java.lang.String tempFileNamePrefix,
java.util.List<java.io.InputStream> dictionaries,
java.nio.charset.CharsetDecoder decoder,
Builder<IntsRef> words)
Reads the dictionary file through the provided InputStreams, building up the words map
|
Constructor and Description |
---|
Dictionary(Directory tempDir,
java.lang.String tempFileNamePrefix,
java.io.InputStream affix,
java.io.InputStream dictionary)
Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix
and dictionary files.
|
Dictionary(Directory tempDir,
java.lang.String tempFileNamePrefix,
java.io.InputStream affix,
java.util.List<java.io.InputStream> dictionaries,
boolean ignoreCase)
Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix
and dictionary files.
|
Modifier and Type | Method and Description |
---|---|
abstract Directory |
CompoundFormat.getCompoundReader(Directory dir,
SegmentInfo si,
IOContext context)
Returns a Directory view (read-only) for the compound files in this segment
|
Modifier and Type | Method and Description |
---|---|
abstract StoredFieldsReader |
StoredFieldsFormat.fieldsReader(Directory directory,
SegmentInfo si,
FieldInfos fn,
IOContext context)
Returns a
StoredFieldsReader to load stored
fields. |
abstract StoredFieldsWriter |
StoredFieldsFormat.fieldsWriter(Directory directory,
SegmentInfo si,
IOContext context)
Returns a
StoredFieldsWriter to write stored
fields. |
abstract Directory |
CompoundFormat.getCompoundReader(Directory dir,
SegmentInfo si,
IOContext context)
Returns a Directory view (read-only) for the compound files in this segment
|
abstract FieldInfos |
FieldInfosFormat.read(Directory directory,
SegmentInfo segmentInfo,
java.lang.String segmentSuffix,
IOContext iocontext)
|
abstract SegmentInfo |
SegmentInfoFormat.read(Directory directory,
java.lang.String segmentName,
byte[] segmentID,
IOContext context)
Read
SegmentInfo data from a directory. |
abstract Bits |
LiveDocsFormat.readLiveDocs(Directory dir,
SegmentCommitInfo info,
IOContext context)
Read live docs bits.
|
abstract TermVectorsReader |
TermVectorsFormat.vectorsReader(Directory directory,
SegmentInfo segmentInfo,
FieldInfos fieldInfos,
IOContext context)
Returns a
TermVectorsReader to read term
vectors. |
abstract TermVectorsWriter |
TermVectorsFormat.vectorsWriter(Directory directory,
SegmentInfo segmentInfo,
IOContext context)
Returns a
TermVectorsWriter to write term
vectors. |
abstract void |
CompoundFormat.write(Directory dir,
SegmentInfo si,
IOContext context)
Packs the provided segment's files into a compound format.
|
abstract void |
SegmentInfoFormat.write(Directory dir,
SegmentInfo info,
IOContext ioContext)
Write
SegmentInfo data. |
abstract void |
FieldInfosFormat.write(Directory directory,
SegmentInfo segmentInfo,
java.lang.String segmentSuffix,
FieldInfos infos,
IOContext context)
Writes the provided
FieldInfos to the
directory. |
abstract void |
LiveDocsFormat.writeLiveDocs(Bits bits,
Directory dir,
SegmentCommitInfo info,
int newDelCount,
IOContext context)
Persist live docs bits.
|
Modifier and Type | Method and Description |
---|---|
StoredFieldsReader |
CompressingStoredFieldsFormat.fieldsReader(Directory directory,
SegmentInfo si,
FieldInfos fn,
IOContext context) |
StoredFieldsWriter |
CompressingStoredFieldsFormat.fieldsWriter(Directory directory,
SegmentInfo si,
IOContext context) |
TermVectorsReader |
CompressingTermVectorsFormat.vectorsReader(Directory directory,
SegmentInfo segmentInfo,
FieldInfos fieldInfos,
IOContext context) |
TermVectorsWriter |
CompressingTermVectorsFormat.vectorsWriter(Directory directory,
SegmentInfo segmentInfo,
IOContext context) |
Constructor and Description |
---|
CompressingStoredFieldsReader(Directory d,
SegmentInfo si,
java.lang.String segmentSuffix,
FieldInfos fn,
IOContext context,
java.lang.String formatName,
CompressionMode compressionMode)
Sole constructor.
|
CompressingStoredFieldsWriter(Directory directory,
SegmentInfo si,
java.lang.String segmentSuffix,
IOContext context,
java.lang.String formatName,
CompressionMode compressionMode,
int chunkSize,
int maxDocsPerChunk,
int blockSize)
Sole constructor.
|
CompressingTermVectorsReader(Directory d,
SegmentInfo si,
java.lang.String segmentSuffix,
FieldInfos fn,
IOContext context,
java.lang.String formatName,
CompressionMode compressionMode)
Sole constructor.
|
CompressingTermVectorsWriter(Directory directory,
SegmentInfo si,
java.lang.String segmentSuffix,
IOContext context,
java.lang.String formatName,
CompressionMode compressionMode,
int chunkSize,
int blockSize)
Sole constructor.
|
Modifier and Type | Class and Description |
---|---|
(package private) class |
Lucene50CompoundReader
Class for accessing a compound stream.
|
Modifier and Type | Field and Description |
---|---|
private Directory |
Lucene50CompoundReader.directory |
Modifier and Type | Method and Description |
---|---|
Directory |
Lucene50CompoundFormat.getCompoundReader(Directory dir,
SegmentInfo si,
IOContext context) |
Modifier and Type | Method and Description |
---|---|
StoredFieldsReader |
Lucene50StoredFieldsFormat.fieldsReader(Directory directory,
SegmentInfo si,
FieldInfos fn,
IOContext context) |
StoredFieldsWriter |
Lucene50StoredFieldsFormat.fieldsWriter(Directory directory,
SegmentInfo si,
IOContext context) |
Directory |
Lucene50CompoundFormat.getCompoundReader(Directory dir,
SegmentInfo si,
IOContext context) |
FieldInfos |
Lucene50FieldInfosFormat.read(Directory directory,
SegmentInfo segmentInfo,
java.lang.String segmentSuffix,
IOContext context) |
private java.util.Map<java.lang.String,Lucene50CompoundReader.FileEntry> |
Lucene50CompoundReader.readEntries(byte[] segmentID,
Directory dir,
java.lang.String entriesFileName)
Helper method that reads CFS entries from an input stream
|
Bits |
Lucene50LiveDocsFormat.readLiveDocs(Directory dir,
SegmentCommitInfo info,
IOContext context) |
void |
Lucene50CompoundFormat.write(Directory dir,
SegmentInfo si,
IOContext context) |
void |
Lucene50FieldInfosFormat.write(Directory directory,
SegmentInfo segmentInfo,
java.lang.String segmentSuffix,
FieldInfos infos,
IOContext context) |
void |
Lucene50LiveDocsFormat.writeLiveDocs(Bits bits,
Directory dir,
SegmentCommitInfo info,
int newDelCount,
IOContext context) |
Constructor and Description |
---|
Lucene50CompoundReader(Directory directory,
SegmentInfo si,
IOContext context)
Create a new CompoundFileDirectory.
|
Modifier and Type | Method and Description |
---|---|
FieldInfos |
Lucene60FieldInfosFormat.read(Directory directory,
SegmentInfo segmentInfo,
java.lang.String segmentSuffix,
IOContext context) |
void |
Lucene60FieldInfosFormat.write(Directory directory,
SegmentInfo segmentInfo,
java.lang.String segmentSuffix,
FieldInfos infos,
IOContext context) |
Modifier and Type | Method and Description |
---|---|
SegmentInfo |
Lucene70SegmentInfoFormat.read(Directory dir,
java.lang.String segment,
byte[] segmentID,
IOContext context) |
void |
Lucene70SegmentInfoFormat.write(Directory dir,
SegmentInfo si,
IOContext ioContext) |
Modifier and Type | Class and Description |
---|---|
(package private) class |
TrackingTmpOutputDirectoryWrapper |
Modifier and Type | Field and Description |
---|---|
(package private) Directory |
SegmentCoreReaders.cfsReader |
private Directory |
PersistentSnapshotDeletionPolicy.dir |
(package private) Directory |
StandardDirectoryReader.ReaderCommit.dir |
Directory |
SegmentInfo.dir
Where this segment resides.
|
private Directory |
CheckIndex.dir |
Directory |
CheckIndex.Status.dir
Directory index is in.
|
private Directory |
MergePolicy.MergeException.dir |
private Directory |
IndexUpgrader.dir |
private Directory |
PKIndexSplitter.dir1 |
private Directory |
PKIndexSplitter.dir2 |
private Directory |
IndexWriter.directory |
Directory |
SegmentWriteState.directory
Directory where this segment will be written
to. |
Directory |
SegmentReadState.directory
Directory where this segment is read from. |
private Directory |
SegmentMerger.directory |
private Directory |
IndexFileDeleter.directory |
private Directory |
ReaderPool.directory |
protected Directory |
DirectoryReader.directory
The index directory.
|
private Directory |
DocumentsWriter.directory |
(package private) Directory |
SegmentInfos.FindSegmentsFile.directory |
private Directory |
IndexWriter.directoryOrig |
(package private) Directory |
DocumentsWriterPerThread.directoryOrig |
private Directory |
IndexFileDeleter.directoryOrig |
(package private) Directory |
IndexFileDeleter.CommitPoint.directoryOrig |
private Directory |
DocumentsWriter.directoryOrig |
private Directory |
PKIndexSplitter.input |
private Directory |
ReaderPool.originalDirectory |
Modifier and Type | Method and Description |
---|---|
Directory |
SegmentReader.directory()
Returns the directory this index resides in.
|
Directory |
DirectoryReader.directory()
Returns the directory this index resides in.
|
Directory |
IndexWriter.getDirectory()
Returns the Directory used by this index.
|
abstract Directory |
IndexCommit.getDirectory()
Returns the
Directory for the index. |
Directory |
StandardDirectoryReader.ReaderCommit.getDirectory() |
Directory |
SnapshotDeletionPolicy.SnapshotCommitPoint.getDirectory() |
Directory |
IndexFileDeleter.CommitPoint.getDirectory() |
Directory |
MergePolicy.MergeException.getDirectory()
Returns the
Directory of the index that hit
the exception. |
Directory |
MergeScheduler.wrapForMerge(MergePolicy.OneMerge merge,
Directory in)
Wraps the incoming
Directory so that we can merge-throttle it
using RateLimitedIndexOutput . |
Directory |
ConcurrentMergeScheduler.wrapForMerge(MergePolicy.OneMerge merge,
Directory in) |
Directory |
NoMergeScheduler.wrapForMerge(MergePolicy.OneMerge merge,
Directory in) |
Modifier and Type | Method and Description |
---|---|
private java.util.List<Lock> |
IndexWriter.acquireWriteLocks(Directory... dirs)
Acquires write locks on all the directories; be sure
to match with a call to
IOUtils.close(java.io.Closeable...) in a
finally clause. |
long |
IndexWriter.addIndexes(Directory... dirs)
Adds all segments from an array of indexes into this index.
|
void |
SegmentInfos.commit(Directory dir)
Writes and syncs to the Directory dir, taking care to
remove the segments file on exception
|
private void |
PKIndexSplitter.createIndex(IndexWriterConfig config,
Directory target,
DirectoryReader reader,
Query preserveFilter,
boolean negateFilter) |
(package private) java.lang.String |
SegmentInfos.finishCommit(Directory dir)
Returns the committed segments_N filename.
|
(package private) DocValuesProducer |
SegmentDocValues.getDocValuesProducer(long gen,
SegmentCommitInfo si,
Directory dir,
FieldInfos infos)
Returns the
DocValuesProducer for the given generation. |
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 java.lang.String |
SegmentInfos.getLastCommitSegmentsFileName(Directory directory)
Get the filename of the segments_N file for the most
recent commit to the index in this Directory.
|
private void |
ReadersAndUpdates.handleDVUpdates(FieldInfos infos,
Directory dir,
DocValuesFormat dvFormat,
SegmentReader reader,
java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles,
long maxDelGen,
InfoStream infoStream) |
protected void |
ConcurrentMergeScheduler.handleMergeException(Directory dir,
java.lang.Throwable exc)
Called when an exception is hit in a background merge
thread
|
static boolean |
DirectoryReader.indexExists(Directory directory)
Returns
true if an index likely exists at
the specified directory. |
static java.util.List<IndexCommit> |
DirectoryReader.listCommits(Directory dir)
Returns all commit points that exist in the Directory.
|
private RefCount<DocValuesProducer> |
SegmentDocValues.newDocValuesProducer(SegmentCommitInfo si,
Directory dir,
java.lang.Long gen,
FieldInfos infos) |
private void |
IndexWriter.noDupDirs(Directory... dirs) |
static DirectoryReader |
DirectoryReader.open(Directory directory)
Returns a IndexReader reading the index in the given
Directory
|
(package private) static DirectoryReader |
StandardDirectoryReader.open(Directory directory,
IndexCommit commit,
java.util.Map<java.lang.String,java.lang.String> readerAttributes)
called from DirectoryReader.open(...) methods
|
static DirectoryReader |
DirectoryReader.open(Directory directory,
java.util.Map<java.lang.String,java.lang.String> readerAttributes)
Returns a IndexReader reading the index in the given
Directory
|
static DirectoryReader |
StandardDirectoryReader.open(Directory directory,
SegmentInfos infos,
java.util.List<? extends LeafReader> oldReaders,
java.util.Map<java.lang.String,java.lang.String> readerAttributes)
This constructor is only used for
StandardDirectoryReader.doOpenIfChanged(SegmentInfos) , as well as NRT replication. |
(package private) void |
SegmentInfos.prepareCommit(Directory dir)
Call this to start a commit.
|
static SegmentInfos |
SegmentInfos.readCommit(Directory directory,
ChecksumIndexInput input,
long generation)
Read the commit from the provided
ChecksumIndexInput . |
static SegmentInfos |
SegmentInfos.readCommit(Directory directory,
java.lang.String segmentFileName)
Read a particular segmentFileName.
|
static SegmentInfos |
SegmentInfos.readLatestCommit(Directory directory)
Find the latest commit (
segments_N file ) and
load all SegmentCommitInfo s. |
(package private) void |
SegmentInfos.rollbackCommit(Directory dir) |
java.lang.String |
MergePolicy.MergeSpecification.segString(Directory dir)
Returns a description of the merges in this specification.
|
void |
MultiPassIndexSplitter.split(IndexReader in,
Directory[] outputs,
boolean seq)
Split source index into multiple parts.
|
Directory |
MergeScheduler.wrapForMerge(MergePolicy.OneMerge merge,
Directory in)
Wraps the incoming
Directory so that we can merge-throttle it
using RateLimitedIndexOutput . |
Directory |
ConcurrentMergeScheduler.wrapForMerge(MergePolicy.OneMerge merge,
Directory in) |
Directory |
NoMergeScheduler.wrapForMerge(MergePolicy.OneMerge merge,
Directory in) |
private void |
SegmentInfos.write(Directory directory) |
void |
SegmentInfos.write(Directory directory,
IndexOutput out)
Write ourselves to the provided
IndexOutput |
private java.util.Set<java.lang.String> |
ReadersAndUpdates.writeFieldInfosGen(FieldInfos fieldInfos,
Directory dir,
FieldInfosFormat infosFormat) |
boolean |
ReadersAndUpdates.writeFieldUpdates(Directory dir,
FieldInfos.FieldNumbers fieldNumbers,
long maxDelGen,
InfoStream infoStream) |
(package private) boolean |
PendingSoftDeletes.writeLiveDocs(Directory dir) |
(package private) boolean |
PendingDeletes.writeLiveDocs(Directory dir)
Writes the live docs to disk and returns
true if any new docs were written. |
boolean |
ReadersAndUpdates.writeLiveDocs(Directory dir) |
Constructor and Description |
---|
CheckIndex(Directory dir)
Create a new CheckIndex on the directory.
|
CheckIndex(Directory dir,
Lock writeLock)
Expert: create a directory with the specified lock.
|
CommitPoint(java.util.Collection<IndexFileDeleter.CommitPoint> commitsToDelete,
Directory directoryOrig,
SegmentInfos segmentInfos) |
DirectoryReader(Directory directory,
LeafReader[] segmentReaders)
Expert: Constructs a
DirectoryReader on the given subReaders. |
DocumentsWriter(DocumentsWriter.FlushNotifications flushNotifications,
int indexCreatedVersionMajor,
java.util.concurrent.atomic.AtomicLong pendingNumDocs,
boolean enableTestPoints,
java.util.function.Supplier<java.lang.String> segmentNameSupplier,
LiveIndexWriterConfig config,
Directory directoryOrig,
Directory directory,
FieldInfos.FieldNumbers globalFieldNumberMap) |
DocumentsWriterPerThread(int indexVersionCreated,
java.lang.String segmentName,
Directory directoryOrig,
Directory directory,
LiveIndexWriterConfig indexWriterConfig,
InfoStream infoStream,
DocumentsWriterDeleteQueue deleteQueue,
FieldInfos.Builder fieldInfos,
java.util.concurrent.atomic.AtomicLong pendingNumDocs,
boolean enableTestPoints) |
FindSegmentsFile(Directory directory)
Sole constructor.
|
IndexFileDeleter(java.lang.String[] files,
Directory directoryOrig,
Directory directory,
IndexDeletionPolicy policy,
SegmentInfos segmentInfos,
InfoStream infoStream,
IndexWriter writer,
boolean initialIndexExists,
boolean isReaderInit)
Initialize the deleter: find all previous commits in
the Directory, incref the files they reference, call
the policy to let it delete commits.
|
IndexUpgrader(Directory dir)
Creates index upgrader on the given directory, using an
IndexWriter using the given
matchVersion . |
IndexUpgrader(Directory dir,
IndexWriterConfig iwc,
boolean deletePriorCommits)
Creates index upgrader on the given directory, using an
IndexWriter using the given
config. |
IndexUpgrader(Directory dir,
InfoStream infoStream,
boolean deletePriorCommits)
Creates index upgrader on the given directory, using an
IndexWriter using the given
matchVersion . |
IndexWriter(Directory d,
IndexWriterConfig conf)
Constructs a new IndexWriter per the settings given in
conf . |
MergeException(java.lang.String message,
Directory dir)
Create a
MergeException . |
MergeException(java.lang.Throwable exc,
Directory dir)
Create a
MergeException . |
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary,
Directory dir)
PersistentSnapshotDeletionPolicy wraps another
IndexDeletionPolicy to enable flexible
snapshotting, passing IndexWriterConfig.OpenMode.CREATE_OR_APPEND
by default. |
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary,
Directory dir,
IndexWriterConfig.OpenMode mode)
PersistentSnapshotDeletionPolicy wraps another
IndexDeletionPolicy to enable flexible snapshotting. |
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Query docsInFirstIndex)
Split an index based on a
Query . |
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Query docsInFirstIndex,
IndexWriterConfig config1,
IndexWriterConfig config2) |
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Term midTerm)
Split an index based on a given primary key term
and a 'middle' term.
|
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Term midTerm,
IndexWriterConfig config1,
IndexWriterConfig config2) |
ReaderCommit(StandardDirectoryReader reader,
SegmentInfos infos,
Directory dir) |
ReaderManager(Directory dir)
Creates and returns a new ReaderManager from the given
Directory . |
ReaderPool(Directory directory,
Directory originalDirectory,
SegmentInfos segmentInfos,
FieldInfos.FieldNumbers fieldNumbers,
java.util.function.LongSupplier completedDelGenSupplier,
InfoStream infoStream,
java.lang.String softDeletesField,
StandardDirectoryReader reader,
java.util.Map<java.lang.String,java.lang.String> readerAttributes) |
SegmentCoreReaders(Directory dir,
SegmentCommitInfo si,
boolean openedFromWriter,
IOContext context,
java.util.Map<java.lang.String,java.lang.String> readerAttributes) |
SegmentDocValuesProducer(SegmentCommitInfo si,
Directory dir,
FieldInfos coreInfos,
FieldInfos allInfos,
SegmentDocValues segDocValues)
Creates a new producer that handles updated docvalues fields
|
SegmentInfo(Directory dir,
Version version,
Version minVersion,
java.lang.String name,
int maxDoc,
boolean isCompoundFile,
Codec codec,
java.util.Map<java.lang.String,java.lang.String> diagnostics,
byte[] id,
java.util.Map<java.lang.String,java.lang.String> attributes,
Sort indexSort)
Construct a new complete SegmentInfo instance from input.
|
SegmentMerger(java.util.List<CodecReader> readers,
SegmentInfo segmentInfo,
InfoStream infoStream,
Directory dir,
FieldInfos.FieldNumbers fieldNumbers,
IOContext context) |
SegmentReadState(Directory dir,
SegmentInfo info,
FieldInfos fieldInfos,
boolean openedFromWriter,
IOContext context,
java.util.Map<java.lang.String,java.lang.String> readerAttributes)
Create a
SegmentReadState . |
SegmentReadState(Directory dir,
SegmentInfo info,
FieldInfos fieldInfos,
boolean openedFromWriter,
IOContext context,
java.lang.String segmentSuffix,
java.util.Map<java.lang.String,java.lang.String> readerAttributes)
Create a
SegmentReadState . |
SegmentWriteState(InfoStream infoStream,
Directory directory,
SegmentInfo segmentInfo,
FieldInfos fieldInfos,
BufferedUpdates segUpdates,
IOContext context)
Sole constructor.
|
SegmentWriteState(InfoStream infoStream,
Directory directory,
SegmentInfo segmentInfo,
FieldInfos fieldInfos,
BufferedUpdates segUpdates,
IOContext context,
java.lang.String segmentSuffix)
Constructor which takes segment suffix.
|
StandardDirectoryReader(Directory directory,
LeafReader[] readers,
IndexWriter writer,
SegmentInfos sis,
boolean applyAllDeletes,
boolean writeAllDeletes,
java.util.Map<java.lang.String,java.lang.String> readerAttributes)
called only from static open() methods
|
TrackingTmpOutputDirectoryWrapper(Directory in) |
Modifier and Type | Method and Description |
---|---|
static void |
GetTermInfo.getTermInfo(Directory dir,
Term term) |
Constructor and Description |
---|
SearcherManager(Directory dir,
SearcherFactory searcherFactory)
Creates and returns a new SearcherManager from the given
Directory . |
Modifier and Type | Class and Description |
---|---|
class |
BaseDirectory
Base implementation for a concrete
Directory that uses a LockFactory for locking. |
class |
ByteBuffersDirectory
A
ByteBuffer -based Directory implementation that
can be used to store index files on the heap. |
class |
FileSwitchDirectory
Expert: A Directory instance that switches files between
two other Directory instances.
|
class |
FilterDirectory
Directory implementation that delegates calls to another directory.
|
class |
FSDirectory
Base class for Directory implementations that store index
files in the file system.
|
class |
HardlinkCopyDirectoryWrapper
This directory wrapper overrides
copyFrom(Directory, String, String, IOContext) in order
to optionally use a hard-link instead of a full byte by byte file copy if applicable. |
class |
LockValidatingDirectoryWrapper
This class makes a best-effort check that a provided
Lock
is valid before any destructive filesystem operation. |
class |
MMapDirectory
File-based
Directory implementation that uses
mmap for reading, and FSDirectory.FSIndexOutput for writing. |
class |
NativeUnixDirectory
A
Directory implementation for all Unixes that uses
DIRECT I/O to bypass OS level IO caching during
merging. |
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 |
NRTCachingDirectory
Wraps a
RAMDirectory
around any provided delegate directory, to
be used during NRT search. |
class |
RAFDirectory
A straightforward implementation of
FSDirectory
using java.io.RandomAccessFile. |
class |
RAMDirectory
Deprecated.
This class uses inefficient synchronization and is discouraged
in favor of
MMapDirectory . It will be removed in future versions
of Lucene. |
class |
SimpleFSDirectory
A straightforward implementation of
FSDirectory
using Files.newByteChannel(Path, java.nio.file.OpenOption...) . |
class |
SleepingLockWrapper
Directory that wraps another, and that sleeps and retries
if obtaining the lock fails.
|
class |
TrackingDirectoryWrapper
A delegating Directory that records which files were
written to and deleted.
|
class |
WindowsDirectory
Native
Directory implementation for Microsoft Windows. |
Modifier and Type | Field and Description |
---|---|
private Directory |
NativeUnixDirectory.delegate |
protected Directory |
FilterDirectory.in |
private Directory |
FileSwitchDirectory.primaryDir |
private Directory |
FileSwitchDirectory.secondaryDir |
Modifier and Type | Method and Description |
---|---|
Directory |
FilterDirectory.getDelegate()
Return the wrapped
Directory . |
private Directory |
FileSwitchDirectory.getDirectory(java.lang.String name) |
Directory |
FileSwitchDirectory.getPrimaryDir()
Return the primary directory
|
Directory |
FileSwitchDirectory.getSecondaryDir()
Return the secondary directory
|
static Directory |
FilterDirectory.unwrap(Directory dir)
Get the wrapped instance by
dir as long as this reader is
an instance of FilterDirectory . |
Modifier and Type | Method and Description |
---|---|
void |
Directory.copyFrom(Directory from,
java.lang.String src,
java.lang.String dest,
IOContext context)
Copies an existing
src file from directory from
to a non-existent file dest in this directory. |
void |
LockValidatingDirectoryWrapper.copyFrom(Directory from,
java.lang.String src,
java.lang.String dest,
IOContext context) |
void |
TrackingDirectoryWrapper.copyFrom(Directory from,
java.lang.String src,
java.lang.String dest,
IOContext context) |
void |
HardlinkCopyDirectoryWrapper.copyFrom(Directory from,
java.lang.String srcFile,
java.lang.String destFile,
IOContext context) |
abstract Lock |
LockFactory.obtainLock(Directory dir,
java.lang.String lockName)
Return a new obtained Lock instance identified by lockName.
|
Lock |
NoLockFactory.obtainLock(Directory dir,
java.lang.String lockName) |
Lock |
SingleInstanceLockFactory.obtainLock(Directory dir,
java.lang.String lockName) |
Lock |
FSLockFactory.obtainLock(Directory dir,
java.lang.String lockName) |
Lock |
VerifyingLockFactory.obtainLock(Directory dir,
java.lang.String lockName) |
(package private) static boolean |
NRTCachingDirectory.slowFileExists(Directory dir,
java.lang.String fileName)
Returns true if the file exists
(can be opened), false if it cannot be opened, and
(unlike Java's File.exists) throws IOException if
there's some unexpected error.
|
static Directory |
FilterDirectory.unwrap(Directory dir)
Get the wrapped instance by
dir as long as this reader is
an instance of FilterDirectory . |
Constructor and Description |
---|
FileSwitchDirectory(java.util.Set<java.lang.String> primaryExtensions,
Directory primaryDir,
Directory secondaryDir,
boolean doClose) |
FilterDirectory(Directory in)
Sole constructor, typically called from sub-classes.
|
HardlinkCopyDirectoryWrapper(Directory in)
Creates a new HardlinkCopyDirectoryWrapper delegating to the given directory
|
LockValidatingDirectoryWrapper(Directory in,
Lock writeLock) |
NativeUnixDirectory(java.nio.file.Path path,
Directory delegate)
Create a new NIOFSDirectory for the named location with
FSLockFactory.getDefault() . |
NativeUnixDirectory(java.nio.file.Path path,
int mergeBufferSize,
long minBytesDirect,
LockFactory lockFactory,
Directory delegate)
Create a new NIOFSDirectory for the named location.
|
NativeUnixDirectory(java.nio.file.Path path,
LockFactory lockFactory,
Directory delegate)
Create a new NIOFSDirectory for the named location.
|
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
<= maxCachedMB |
SleepingLockWrapper(Directory delegate,
long lockWaitTimeout)
Create a new SleepingLockFactory
|
SleepingLockWrapper(Directory delegate,
long lockWaitTimeout,
long pollInterval)
Create a new SleepingLockFactory
|
TrackingDirectoryWrapper(Directory in) |
Modifier and Type | Field and Description |
---|---|
private Directory |
OfflineSorter.dir |
private Directory |
OfflineSorter.SortPartitionTask.dir |
private Directory |
OfflineSorter.MergePartitionsTask.dir |
Modifier and Type | Method and Description |
---|---|
Directory |
OfflineSorter.getDirectory()
Returns the
Directory we use to create temp files. |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<? extends Directory> |
CommandLineUtil.loadDirectoryClass(java.lang.String clazzName)
Loads a specific Directory implementation
|
Modifier and Type | Method and Description |
---|---|
static void |
IOUtils.deleteFiles(Directory dir,
java.util.Collection<java.lang.String> names)
Deletes all given file names.
|
static void |
IOUtils.deleteFilesIgnoringExceptions(Directory dir,
java.util.Collection<java.lang.String> files)
Deletes all given files, suppressing all thrown IOExceptions.
|
static void |
IOUtils.deleteFilesIgnoringExceptions(Directory dir,
java.lang.String... files) |
(package private) void |
OfflineSorter.mergePartitions(Directory trackingDir,
java.util.List<java.util.concurrent.Future<OfflineSorter.Partition>> segments)
Merge the most recent
maxTempFile partitions into a new partition. |
static boolean |
IOUtils.spins(Directory dir)
If the dir is an
FSDirectory or wraps one via possibly
nested FilterDirectory or FileSwitchDirectory ,
this returns IOUtils.spins(Path) for the wrapped directory,
else, true. |
Constructor and Description |
---|
MergePartitionsTask(Directory dir,
java.util.List<java.util.concurrent.Future<OfflineSorter.Partition>> segmentsToMerge) |
OfflineSorter(Directory dir,
java.lang.String tempFileNamePrefix)
Defaults constructor.
|
OfflineSorter(Directory dir,
java.lang.String tempFileNamePrefix,
java.util.Comparator<BytesRef> comparator)
Defaults constructor with a custom comparator.
|
OfflineSorter(Directory dir,
java.lang.String tempFileNamePrefix,
java.util.Comparator<BytesRef> comparator,
OfflineSorter.BufferSize ramBufferSize,
int maxTempfiles,
int valueLength,
java.util.concurrent.ExecutorService exec,
int maxPartitionsInRAM)
All-details constructor.
|
SortPartitionTask(Directory dir,
OfflineSorter.Partition part) |
Modifier and Type | Field and Description |
---|---|
private Directory |
BKDRadixSelector.tempDir |
(package private) Directory |
OfflinePointWriter.tempDir |
Constructor and Description |
---|
BKDRadixSelector(int numDim,
int bytesPerDim,
int maxPointsSortInHeap,
Directory tempDir,
java.lang.String tempFileNamePrefix)
Sole constructor.
|
BKDWriter(int maxDoc,
Directory tempDir,
java.lang.String tempFileNamePrefix,
int numDataDims,
int numIndexDims,
int bytesPerDim,
int maxPointsInLeafNode,
double maxMBSortInHeap,
long totalPointCount) |
OfflinePointReader(Directory tempDir,
java.lang.String tempFileName,
int packedBytesLength,
long start,
long length,
byte[] reusableBuffer) |
OfflinePointWriter(Directory tempDir,
java.lang.String tempFileNamePrefix,
int packedBytesLength,
java.lang.String desc,
long expectedCount)
Create a new writer with an unknown number of incoming points
|