Package org.apache.lucene.index

# Class MergePolicy.MergeSpecification

java.lang.Object
org.apache.lucene.index.MergePolicy.MergeSpecification

Enclosing class:
  `MergePolicy`

public static class MergePolicy.MergeSpecification extends Object
A MergeSpecification instance provides the information necessary to perform multiple merges. It simply contains a list of `MergePolicy.OneMerge` instances.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final List<MergePolicy.OneMerge>`
  `merges`
  The subset of segments to be included in the primitive merge.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MergeSpecification()`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(MergePolicy.OneMerge merge)`
  Adds the provided `MergePolicy.OneMerge` to this specification.
  `String`
  `segString(Directory dir)`
  Deprecated.
  Use `toString()` instead.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### merges

    public final List<MergePolicy.OneMerge> merges
    The subset of segments to be included in the primitive merge.

- ## Constructor Details

  - ### MergeSpecification

    public MergeSpecification()
    Sole constructor. Use `add(MergePolicy.OneMerge)` to add merges.

- ## Method Details

  - ### add

    public void add(MergePolicy.OneMerge merge)
    Adds the provided `MergePolicy.OneMerge` to this specification.

  - ### segString

    @Deprecated public String segString(Directory dir)
    Deprecated.
    Use `toString()` instead. The `Directory` parameter is ignored and will be removed in a future release.
    Returns a description of the merges in this specification

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`