IndexCreator (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.graphdb.schema

## Interface IndexCreator

-     public interface IndexCreator

  A builder for entering details about an index to create. After all details have been entered `create()` must be called for the index to actually be created. An index creator knows which `label` it is to be created for. All methods except `create()` will return an `IndexCreator` which should be used for further interaction.
  See Also:
    `Schema`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexDefinition` | `create()` Creates an index with the details specified by the other methods in this interface.
    `IndexCreator` | `on(String propertyKey)` Includes the given `propertyKey` in this index, such that `nodes` with the assigned `label` and this property key will have its values indexed.

- - ### Method Detail

    - #### on

          IndexCreator on(String propertyKey)

      Includes the given `propertyKey` in this index, such that `nodes` with the assigned `label` and this property key will have its values indexed. NOTE: currently only a single property key per index is supported.
      Parameters:
        `propertyKey` - the property key to include in this index to be created.
      Returns:
        an `IndexCreator` instance to be used for further interaction.

    - #### create

          IndexDefinition create()
                                 throws ConstraintViolationException

      Creates an index with the details specified by the other methods in this interface.
      Returns:
        the created `index`.
      Throws:
        `ConstraintViolationException` - if creating this index would violate one or more constraints.

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.