# IndexSpec
Date: 2012-02-24

## com.google.appengine.api.search
Class IndexSpec

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

    public class IndexSpec

extends java.lang.Object

Represents information about an index. This class is used to fully specify the index you want to retrieve from the `SearchService`. To build an instance use the `newBuilder()` method and set all required parameters, plus optional values different than the defaults.

       IndexSpec spec = IndexSpec.newBuilder()
           .setName("docs").setConsistency(Consistency.PER_DOCUMENT).build();
       ...
       Index index = indexManager.getIndex(spec);

Nested Class Summary
`static class` `IndexSpec.Builder` A builder of IndexSpec.

Method Summary
`boolean` `equals(java.lang.Object obj)`
`Consistency` `getConsistency()`
`java.lang.String` `getName()`
`int` `hashCode()`
`static IndexSpec.Builder` `newBuilder()` Creates a new IndexSpec builder.
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### getName

    public java.lang.String getName()

  Returns:
    the name of the index

### getConsistency

    public Consistency getConsistency()

  Returns:
    the consistency mode of this index

### newBuilder

    public static IndexSpec.Builder newBuilder()

  Creates a new IndexSpec builder. You must use this method to obtain a new builder. The returned builder must be used to specify all properties of the IndexSpec. To obtain the IndexSpec call the `IndexSpec.Builder.build()` method on the returned builder.

  Returns:
    a builder which constructs a IndexSpec object

### hashCode

    public int hashCode()

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

### equals

    public boolean equals(java.lang.Object obj)

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

### toString

    public java.lang.String toString()

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