## Uses of Class
org.apache.lucene.index.IndexWriter

- Packages that use IndexWriter
  Package | Description
  --- | ---
  org.apache.lucene.index | Code to maintain and access indices.
  org.apache.lucene.search | Code to search indices.

- - ### Uses of IndexWriter in org.apache.lucene.index

    Methods in org.apache.lucene.index with parameters of type IndexWriter
    Modifier and Type | Method and Description
    --- | ---
    `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)`.
    `MergePolicy.MergeSpecification` | OneMergeWrappingMergePolicy.`findForcedDeletesMerges(SegmentInfos segmentInfos, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | MergePolicyWrapper.`findForcedDeletesMerges(SegmentInfos segmentInfos, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | TieredMergePolicy.`findForcedDeletesMerges(SegmentInfos infos, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | NoMergePolicy.`findForcedDeletesMerges(SegmentInfos segmentInfos, IndexWriter writer)`
    `abstract MergePolicy.MergeSpecification` | MergePolicy.`findForcedDeletesMerges(SegmentInfos segmentInfos, IndexWriter writer)` Determine what set of merge operations is necessary in order to expunge all deletes from the index.
    `MergePolicy.MergeSpecification` | LogMergePolicy.`findForcedDeletesMerges(SegmentInfos segmentInfos, IndexWriter writer)` Finds merges necessary to force-merge all deletes from the index.
    `MergePolicy.MergeSpecification` | OneMergeWrappingMergePolicy.`findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | MergePolicyWrapper.`findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | TieredMergePolicy.`findForcedMerges(SegmentInfos infos, int maxSegmentCount, Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | UpgradeIndexMergePolicy.`findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | NoMergePolicy.`findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer)`
    `abstract MergePolicy.MergeSpecification` | MergePolicy.`findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer)` Determine what set of merge operations is necessary in order to merge to `<=` the specified segment count.
    `MergePolicy.MergeSpecification` | LogMergePolicy.`findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer)` Returns the merges necessary to merge the index down to a specified number of segments.
    `MergePolicy.MergeSpecification` | OneMergeWrappingMergePolicy.`findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | MergePolicyWrapper.`findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | TieredMergePolicy.`findMerges(MergeTrigger mergeTrigger, SegmentInfos infos, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | UpgradeIndexMergePolicy.`findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos, IndexWriter writer)`
    `MergePolicy.MergeSpecification` | NoMergePolicy.`findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos, IndexWriter writer)`
    `abstract MergePolicy.MergeSpecification` | MergePolicy.`findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos, IndexWriter writer)` Determine what set of merge operations are now necessary on the index.
    `MergePolicy.MergeSpecification` | LogMergePolicy.`findMerges(MergeTrigger mergeTrigger, SegmentInfos infos, IndexWriter writer)` Checks if any merges are now necessary and returns a `MergePolicy.MergeSpecification` if so.
    `protected ConcurrentMergeScheduler.MergeThread` | ConcurrentMergeScheduler.`getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge)` Create and return a new MergeThread
    `protected boolean` | LogMergePolicy.`isMerged(SegmentInfos infos, int maxNumSegments, Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer)` Returns true if the number of segments eligible for merging is less than or equal to the specified `maxNumSegments`.
    `protected boolean` | MergePolicy.`isMerged(SegmentInfos infos, SegmentCommitInfo info, IndexWriter writer)` Returns true if this single info is already fully merged (has no pending deletes, is in the same dir as the writer, and matches the current compound file setting
    `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.
    `void` | SerialMergeScheduler.`merge(IndexWriter writer, MergeTrigger trigger, boolean newMergesFound)` Just do the merges in sequence.
    `void` | NoMergeScheduler.`merge(IndexWriter writer, MergeTrigger trigger, boolean newMergesFound)`
    `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)`
    `protected void` | LogMergePolicy.`message(String message, IndexWriter writer)` Print a debug message to `IndexWriter`'s `infoStream`.
    `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.
    `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.
    `protected TieredMergePolicy.MergeScore` | TieredMergePolicy.`score(List<SegmentCommitInfo> candidate, boolean hitTooLarge, long mergingBytes, IndexWriter writer)` Expert: scores one merge; subclasses can override.
    `protected long` | MergePolicyWrapper.`size(SegmentCommitInfo info, IndexWriter writer)`
    `protected long` | NoMergePolicy.`size(SegmentCommitInfo info, IndexWriter writer)`
    `protected long` | LogDocMergePolicy.`size(SegmentCommitInfo info, IndexWriter writer)`
    `protected long` | LogByteSizeMergePolicy.`size(SegmentCommitInfo info, IndexWriter writer)`
    `protected long` | MergePolicy.`size(SegmentCommitInfo info, IndexWriter writer)` Return the byte size of the provided `SegmentCommitInfo`, pro-rated by percentage of non-deleted documents is set.
    `protected long` | LogMergePolicy.`sizeBytes(SegmentCommitInfo info, IndexWriter writer)` Return the byte size of the provided `SegmentCommitInfo`, pro-rated by percentage of non-deleted documents if `LogMergePolicy.setCalibrateSizeByDeletes(boolean)` is set.
    `protected long` | LogMergePolicy.`sizeDocs(SegmentCommitInfo info, IndexWriter writer)` Return the number of documents in the provided `SegmentCommitInfo`, pro-rated by percentage of non-deleted documents if `LogMergePolicy.setCalibrateSizeByDeletes(boolean)` is set.
    `boolean` | MergePolicyWrapper.`useCompoundFile(SegmentInfos infos, SegmentCommitInfo mergedInfo, IndexWriter writer)`
    `boolean` | NoMergePolicy.`useCompoundFile(SegmentInfos segments, SegmentCommitInfo newSegment, IndexWriter writer)`
    `boolean` | MergePolicy.`useCompoundFile(SegmentInfos infos, SegmentCommitInfo mergedInfo, IndexWriter writer)` Returns true if a new segment (regardless of its origin) should use the compound file format.
    `protected boolean` | LogMergePolicy.`verbose(IndexWriter writer)` Returns true if `LMP` is enabled in `IndexWriter`'s `infoStream`.

    Constructors in org.apache.lucene.index with parameters of type IndexWriter
    Constructor and Description
    `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.

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

    Constructors in org.apache.lucene.search with parameters of type IndexWriter
    Constructor and Description
    `ControlledRealTimeReopenThread(IndexWriter writer, ReferenceManager<T> manager, double targetMaxStaleSec, double targetMinStaleSec)` Create ControlledRealTimeReopenThread, to periodically reopen the a `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`.

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