Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

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

    public final class Schema

extends java.lang.Object

Contains information about the kinds of document `Fields` which are supported by the `Index`.

       // Get the index manager for the default namespace
       IndexManager indexManager = IndexManagerFactory.newIndexManager();

       // List the first page of indexes available and retrieve schemas
       ListIndexesResponse response = indexManager.listIndexes(
           ListIndexesRequest.newBuilder().setSchemaFetched(true).build());

       // List out elements of Schema
       for (Index index : response) {
         Schema schema = index.getSchema();
         for (String fieldName : schema.getFieldNames()) {
            List typesForField = schema.getFieldTypes(fieldName);
         }
       }

Method Summary
`boolean` | `equals(java.lang.Object obj)`
`java.util.Set<java.lang.String>` | `getFieldNames()`
`java.util.List<Field.FieldType>` | `getFieldTypes(java.lang.String fieldName)`
`int` | `hashCode()`
`java.lang.String` | `toString()`

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

Method Detail

### getFieldNames

    public java.util.Set<java.lang.String> getFieldNames()

  Returns:
    the set of field names supported in the schema

### getFieldTypes

    public java.util.List<Field.FieldType> getFieldTypes(java.lang.String fieldName)

  Parameters:
    `fieldName` - the name of the field to return supported types
  Returns:
    a list of `Feild.FieldType` supported for the given field name

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD