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

Packages that use MergePolicy
Package
Description
org.apache.lucene.index
Code to maintain and access indices.

## Uses of MergePolicy in org.apache.lucene.index

Subclasses of MergePolicy in org.apache.lucene.index
Modifier and Type
Class
Description
`class`
`FilterMergePolicy`
A wrapper for `MergePolicy` instances.
`class`
`LogByteSizeMergePolicy`
This is a `LogMergePolicy` that measures size of a segment as the total byte size of the segment's files.
`class`
`LogDocMergePolicy`
This is a `LogMergePolicy` that measures size of a segment as the number of documents (not taking deletions into account).
`class`
`LogMergePolicy`
This class implements a `MergePolicy` that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor.
`final class`
`NoMergePolicy`
A `MergePolicy` which never returns merges to execute.
`class`
`OneMergeWrappingMergePolicy`
A wrapping merge policy that wraps the `MergePolicy.OneMerge` objects returned by the wrapped merge policy.
`final class`
`SoftDeletesRetentionMergePolicy`
This `MergePolicy` allows to carry over soft deleted documents across merges.
`class`
`TieredMergePolicy`
Merges segments of approximately equal size, subject to an allowed number of segments per tier.
`class`
`UpgradeIndexMergePolicy`
This `MergePolicy` is used for upgrading all existing segments of an index when calling `IndexWriter.forceMerge(int)`.
Fields in org.apache.lucene.index declared as MergePolicy
Modifier and Type
Field
Description
`protected final MergePolicy`
FilterMergePolicy.`in`
The wrapped `MergePolicy`.
`static final MergePolicy`
NoMergePolicy.`INSTANCE`
Singleton instance.
`protected MergePolicy`
LiveIndexWriterConfig.`mergePolicy`
`MergePolicy` for selecting merges.
Methods in org.apache.lucene.index that return MergePolicy
Modifier and Type
Method
Description
`MergePolicy`
IndexWriterConfig.`getMergePolicy()`
`MergePolicy`
LiveIndexWriterConfig.`getMergePolicy()`
Returns the current MergePolicy in use by this writer.
`MergePolicy`
FilterMergePolicy.`unwrap()`
Methods in org.apache.lucene.index with parameters of type MergePolicy
Modifier and Type
Method
Description
`IndexWriterConfig`
IndexWriterConfig.`setMergePolicy(MergePolicy mergePolicy)`
`LiveIndexWriterConfig`
LiveIndexWriterConfig.`setMergePolicy(MergePolicy mergePolicy)`
Expert: `MergePolicy` is invoked whenever there are changes to the segments in the index.
Constructors in org.apache.lucene.index with parameters of type MergePolicy
Modifier
Constructor
Description
``
`FilterMergePolicy(MergePolicy in)`
Creates a new filter merge policy instance wrapping another.
``
`OneMergeWrappingMergePolicy(MergePolicy in, UnaryOperator<MergePolicy.OneMerge> wrapOneMerge)`
Constructor
``
`SoftDeletesRetentionMergePolicy(String field, Supplier<Query> retentionQuerySupplier, MergePolicy in)`
Creates a new `SoftDeletesRetentionMergePolicy`
``
`UpgradeIndexMergePolicy(MergePolicy in)`
Wrap the given `MergePolicy` and intercept forceMerge requests to only upgrade segments written with previous Lucene versions.