org.apache.lucene.index

## Class IndexWriterMaxDocsChanger

- java.lang.Object
- - org.apache.lucene.index.IndexWriterMaxDocsChanger

-     public final class IndexWriterMaxDocsChanger
      extends Object

  Accessor to make some package protected methods in `IndexWriter` available for testing.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `restoreMaxDocs()` Returns to the default `IndexWriter.MAX_DOCS` limit.
    `static void` | `setMaxDocs(int limit)` Tells `IndexWriter` to enforce the specified limit as the maximum number of documents in one index; call `restoreMaxDocs()` once your test is done.

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

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

- - ### Method Detail

    - #### setMaxDocs

          public static void setMaxDocs(int limit)

      Tells `IndexWriter` to enforce the specified limit as the maximum number of documents in one index; call `restoreMaxDocs()` once your test is done.
      See Also:
        `LuceneTestCase.setIndexWriterMaxDocs(int)`

    - #### restoreMaxDocs

          public static void restoreMaxDocs()

      Returns to the default `IndexWriter.MAX_DOCS` limit.
      See Also:
        `LuceneTestCase.restoreIndexWriterMaxDocs()`

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