Package | Description |
---|---|
org.apache.lucene.index |
Code to maintain and access indices.
|
org.apache.lucene.search |
Code to search indices.
|
Modifier and Type | Field and Description |
---|---|
(package private) IndexWriter |
ConcurrentMergeScheduler.MergeThread.writer |
(package private) IndexWriter |
StandardDirectoryReader.writer |
private IndexWriter |
IndexFileDeleter.writer |
Modifier and Type | Field and Description |
---|---|
private SetOnce<IndexWriter> |
IndexWriterConfig.writer |
Modifier and Type | Method and Description |
---|---|
static BufferedUpdatesStream.ApplyDeletesResult |
FrozenBufferedUpdates.closeSegmentStates(IndexWriter writer,
BufferedUpdatesStream.SegmentState[] segStates,
boolean success)
Close segment states previously opened with openSegmentStates.
|
protected void |
ConcurrentMergeScheduler.doMerge(IndexWriter writer,
MergePolicy.OneMerge merge)
Does the actual merge, by calling
merge(org.apache.lucene.index.MergePolicy.OneMerge) |
protected DirectoryReader |
StandardDirectoryReader.doOpenIfChanged(IndexWriter writer,
boolean applyAllDeletes) |
protected DirectoryReader |
FilterDirectoryReader.doOpenIfChanged(IndexWriter writer,
boolean applyAllDeletes) |
protected abstract DirectoryReader |
DirectoryReader.doOpenIfChanged(IndexWriter writer,
boolean applyAllDeletes)
Implement this method to support
DirectoryReader.openIfChanged(DirectoryReader,IndexWriter,boolean) . |
private void |
FrozenBufferedUpdates.finishApply(IndexWriter writer,
BufferedUpdatesStream.SegmentState[] segStates,
boolean success,
java.util.Set<java.lang.String> delFiles) |
(package private) void |
FrozenBufferedUpdates.forceApply(IndexWriter writer)
Translates a frozen packet of delete term/query, or doc values
updates, into their actual docIDs in the index, and applies the change.
|
private java.util.List<SegmentCommitInfo> |
FrozenBufferedUpdates.getInfosToApply(IndexWriter writer)
Returns the
SegmentCommitInfo that this packet is supposed to apply its deletes to, or null
if the private segment was already merged away. |
protected ConcurrentMergeScheduler.MergeThread |
ConcurrentMergeScheduler.getMergeThread(IndexWriter writer,
MergePolicy.OneMerge merge)
Create and return a new MergeThread
|
private void |
ConcurrentMergeScheduler.initDynamicDefaults(IndexWriter writer) |
protected boolean |
ConcurrentMergeScheduler.maybeStall(IndexWriter writer)
This is invoked by
ConcurrentMergeScheduler.merge(org.apache.lucene.index.IndexWriter, org.apache.lucene.index.MergeTrigger, boolean) to possibly stall the incoming
thread when there are too many merges running or pending. |
abstract void |
MergeScheduler.merge(IndexWriter writer,
MergeTrigger trigger,
boolean newMergesFound)
Run the merges provided by
getNextMerge() . |
void |
ConcurrentMergeScheduler.merge(IndexWriter writer,
MergeTrigger trigger,
boolean newMergesFound) |
void |
SerialMergeScheduler.merge(IndexWriter writer,
MergeTrigger trigger,
boolean newMergesFound)
Just do the merges in sequence.
|
void |
NoMergeScheduler.merge(IndexWriter writer,
MergeTrigger trigger,
boolean newMergesFound) |
static DirectoryReader |
DirectoryReader.open(IndexWriter writer)
Open a near real time IndexReader from the
IndexWriter . |
static DirectoryReader |
DirectoryReader.open(IndexWriter writer,
boolean applyAllDeletes,
boolean writeAllDeletes)
Expert: open a near real time IndexReader from the
IndexWriter ,
controlling whether past deletions should be applied. |
(package private) static DirectoryReader |
StandardDirectoryReader.open(IndexWriter writer,
SegmentInfos infos,
boolean applyAllDeletes,
boolean writeAllDeletes,
java.util.Map<java.lang.String,java.lang.String> readerAttributes)
Used by near real-time search
|
static DirectoryReader |
DirectoryReader.openIfChanged(DirectoryReader oldReader,
IndexWriter writer)
Expert: If there changes (committed or not) in the
IndexWriter versus what the provided reader is
searching, then open and return a new
IndexReader searching both committed and uncommitted
changes from the writer; else, return null (though, the
current implementation never returns null). |
static DirectoryReader |
DirectoryReader.openIfChanged(DirectoryReader oldReader,
IndexWriter writer,
boolean applyAllDeletes)
Expert: Opens a new reader, if there are any changes, controlling whether past deletions should be applied.
|
private static BufferedUpdatesStream.SegmentState[] |
FrozenBufferedUpdates.openSegmentStates(IndexWriter writer,
java.util.List<SegmentCommitInfo> infos,
java.util.Set<SegmentCommitInfo> alreadySeenSegments,
long delGen)
Opens SegmentReader and inits SegmentState for each segment.
|
void |
IndexWriter.Event.process(IndexWriter writer)
Processes the event.
|
(package private) IndexWriterConfig |
IndexWriterConfig.setIndexWriter(IndexWriter writer)
Sets the
IndexWriter this config is attached to. |
(package private) boolean |
FrozenBufferedUpdates.tryApply(IndexWriter writer)
Translates a frozen packet of delete term/query, or doc values
updates, into their actual docIDs in the index, and applies the change.
|
private void |
BufferedUpdatesStream.waitApply(java.util.Set<FrozenBufferedUpdates> waitFor,
IndexWriter writer) |
(package private) void |
BufferedUpdatesStream.waitApplyAll(IndexWriter writer)
Waits for all in-flight packets, which are already being resolved concurrently
by indexing threads, to finish.
|
(package private) void |
BufferedUpdatesStream.waitApplyForMerge(java.util.List<SegmentCommitInfo> mergeInfos,
IndexWriter writer)
Waits only for those in-flight packets that apply to these merge segments.
|
Constructor and Description |
---|
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.
|
MergeThread(IndexWriter writer,
MergePolicy.OneMerge merge)
Sole constructor.
|
ReaderManager(IndexWriter writer)
Creates and returns a new ReaderManager from the given
IndexWriter . |
ReaderManager(IndexWriter writer,
boolean applyAllDeletes,
boolean writeAllDeletes)
Expert: creates and returns a new ReaderManager from the given
IndexWriter , controlling whether past deletions should be applied. |
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
|
Modifier and Type | Field and Description |
---|---|
private IndexWriter |
ControlledRealTimeReopenThread.writer |
Constructor and Description |
---|
ControlledRealTimeReopenThread(IndexWriter writer,
ReferenceManager<T> manager,
double targetMaxStaleSec,
double targetMinStaleSec)
Create ControlledRealTimeReopenThread, to periodically
reopen the
ReferenceManager . |
SearcherManager(IndexWriter writer,
boolean applyAllDeletes,
boolean writeAllDeletes,
SearcherFactory searcherFactory)
Expert: creates and returns a new SearcherManager from the given
IndexWriter , controlling whether past deletions should be applied. |
SearcherManager(IndexWriter writer,
SearcherFactory searcherFactory)
Creates and returns a new SearcherManager from the given
IndexWriter . |