## org.apache.lucene.index
Class MockRandomMergePolicy

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

All Implemented Interfaces:
  Closeable

    public class MockRandomMergePolicy

extends org.apache.lucene.index.MergePolicy

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
`org.apache.lucene.index.MergePolicy.MergeAbortedException, org.apache.lucene.index.MergePolicy.MergeException, org.apache.lucene.index.MergePolicy.MergeSpecification, org.apache.lucene.index.MergePolicy.OneMerge`

Field Summary

Fields inherited from class org.apache.lucene.index.MergePolicy
`writer`

Constructor Summary
`MockRandomMergePolicy(Random random)`

Method Summary
`void` `close()`
`org.apache.lucene.index.MergePolicy.MergeSpecification` `findMerges(org.apache.lucene.index.SegmentInfos segmentInfos)`
`org.apache.lucene.index.MergePolicy.MergeSpecification` `findMergesForOptimize(org.apache.lucene.index.SegmentInfos segmentInfos, int maxSegmentCount, Map<org.apache.lucene.index.SegmentInfo,Boolean> segmentsToOptimize)`
`org.apache.lucene.index.MergePolicy.MergeSpecification` `findMergesToExpungeDeletes(org.apache.lucene.index.SegmentInfos segmentInfos)`
`boolean` `useCompoundFile(org.apache.lucene.index.SegmentInfos infos, org.apache.lucene.index.SegmentInfo mergedInfo)`

Methods inherited from class org.apache.lucene.index.MergePolicy
`setIndexWriter`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MockRandomMergePolicy

    public MockRandomMergePolicy(Random random)

Method Detail

### findMerges

    public org.apache.lucene.index.MergePolicy.MergeSpecification findMerges(org.apache.lucene.index.SegmentInfos segmentInfos)

  Specified by:
    `findMerges` in class `org.apache.lucene.index.MergePolicy`

### findMergesForOptimize

    public org.apache.lucene.index.MergePolicy.MergeSpecification findMergesForOptimize(org.apache.lucene.index.SegmentInfos segmentInfos,
                                                                                        int maxSegmentCount,
                                                                                        Map<org.apache.lucene.index.SegmentInfo,Boolean> segmentsToOptimize)
                                                                                 throws org.apache.lucene.index.CorruptIndexException,
                                                                                        IOException

  Specified by:
    `findMergesForOptimize` in class `org.apache.lucene.index.MergePolicy`
  Throws:
    `org.apache.lucene.index.CorruptIndexException`
    `IOException`

### findMergesToExpungeDeletes

    public org.apache.lucene.index.MergePolicy.MergeSpecification findMergesToExpungeDeletes(org.apache.lucene.index.SegmentInfos segmentInfos)
                                                                                      throws org.apache.lucene.index.CorruptIndexException,
                                                                                             IOException

  Specified by:
    `findMergesToExpungeDeletes` in class `org.apache.lucene.index.MergePolicy`
  Throws:
    `org.apache.lucene.index.CorruptIndexException`
    `IOException`

### close

    public void close()

  Specified by:
    `close` in interface `Closeable`
  Specified by:
    `close` in class `org.apache.lucene.index.MergePolicy`

### useCompoundFile

    public boolean useCompoundFile(org.apache.lucene.index.SegmentInfos infos,
                                   org.apache.lucene.index.SegmentInfo mergedInfo)
                            throws IOException

  Specified by:
    `useCompoundFile` in class `org.apache.lucene.index.MergePolicy`
  Throws:
    `IOException`

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