Class NoMergePolicy

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Cloneable

    public final class NoMergePolicy
    extends MergePolicy
    A MergePolicy which never returns merges to execute (hence it's name). It is also a singleton and can be accessed through NO_COMPOUND_FILES if you want to indicate the index does not use compound files, or through COMPOUND_FILES otherwise. Use it if you want to prevent an IndexWriter from ever executing merges, without going through the hassle of tweaking a merge policy's settings to achieve that, such as changing its merge factor.