org.apache.lucene.index

## Class IndexWriter.MaxFieldLength

- java.lang.Object
- - org.apache.lucene.index.IndexWriter.MaxFieldLength

- Enclosing class:
    IndexWriter

      public static final class IndexWriter.MaxFieldLength
      extends java.lang.Object

  Specifies maximum field length (in number of tokens/terms) in `IndexWriter` constructors. `IndexWriter.setMaxFieldLength(int)` overrides the value set by the constructor.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static IndexWriter.MaxFieldLength` | `LIMITED` Sets the maximum field length to `IndexWriter.DEFAULT_MAX_FIELD_LENGTH`
    `static IndexWriter.MaxFieldLength` | `UNLIMITED` Sets the maximum field length to `Integer.MAX_VALUE`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MaxFieldLength(int limit)` Public constructor to allow users to specify the maximum field size limit.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getLimit()`
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### UNLIMITED

          public static final IndexWriter.MaxFieldLength UNLIMITED

      Sets the maximum field length to `Integer.MAX_VALUE`.

    - #### LIMITED

          public static final IndexWriter.MaxFieldLength LIMITED

      Sets the maximum field length to `IndexWriter.DEFAULT_MAX_FIELD_LENGTH`

  - ### Constructor Detail

    - #### MaxFieldLength

          public MaxFieldLength(int limit)

      Public constructor to allow users to specify the maximum field size limit.
      Parameters:
        `limit` - The maximum field length

  - ### Method Detail

    - #### getLimit

          public int getLimit()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

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