com.google.appengine.api.search

## Class IndexSpec.Builder

- java.lang.Object
- - com.google.appengine.api.search.IndexSpec.Builder

- Enclosing class:
    IndexSpec

      public static final class IndexSpec.Builder
      extends java.lang.Object

  A builder of IndexSpec.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexSpec` | `build()` Builds a valid IndexSpec.
    `IndexSpec.Builder` | `setConsistency(Consistency consistency)` Deprecated. As of 1.7.3, consistency setting is no longer required, since PER_DOCUMENT is the only mode supported.
    `IndexSpec.Builder` | `setName(java.lang.String name)` Sets the unique name of the index.

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

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

- - ### Method Detail

    - #### setName

          public IndexSpec.Builder setName(java.lang.String name)

      Sets the unique name of the index.
      Parameters:
        `name` - the name of the index
      Returns:
        this Builder
      Throws:
        `java.lang.IllegalArgumentException` - if the index name length is not between 1 and IndexChecker#MAXIMUM_INDEX_NAME_LENGTH

    - #### setConsistency

          @Deprecated
          public IndexSpec.Builder setConsistency(Consistency consistency)

      Deprecated. As of 1.7.3, consistency setting is no longer required, since PER_DOCUMENT is the only mode supported.
      Sets the consistency mode in which the index operates.
      Parameters:
        `consistency` - the consistency mode in which the index operates
      Returns:
        this Builder

    - #### build

          public IndexSpec build()

      Builds a valid IndexSpec. The builder must have set a valid index name.
      Returns:
        the IndexSpec built by this builder
      Throws:
        `java.lang.IllegalArgumentException` - if the IndexSpec built is not valid