Index (Apache Geode 1.15.4)

org.apache.geode.cache.query

## Interface Index

-     public interface Index

  An index that is built over the data stored in a GemFire `Region`.

  For a description of the types of indexes that GemFire currently supports, see IndexType.

  An index is specified using a name, indexedExpression, fromClause, and optionally a projectionAttributes.

  The name uniquely identifies the index to for the statistics services in GemFire.

  The indexedExpression is the lookup value for the index. The way that an indexedExpression is specified and used varies depending on the type of index. For more information, see IndexType.

  The fromClause specifies the collection(s) of objects that the index ranges over, and must contain one and only one region path.

  The optional projectAttributes specifies a tranformation that is done on the values and is used for pre-computing a corresponding projection as defined in a query.

  Since:
    GemFire 4.0
  See Also:
    `QueryService.createIndex(String, IndexType, String, String)`, `IndexType`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCanonicalizedFromClause()` Get the canonicalized fromClause for this index.
    `String` | `getCanonicalizedIndexedExpression()` Get the canonicalized indexedExpression for this index.
    `String` | `getCanonicalizedProjectionAttributes()` Get the canonicalized projectionAttributes for this expression.
    `String` | `getFromClause()` Get the original fromClause for this index.
    `String` | `getIndexedExpression()` Get the original indexedExpression for this index.
    `String` | `getName()` Returns the unique name of this index
    `String` | `getProjectionAttributes()` Get the original projectionAttributes for this expression.
    `Region<?,?>` | `getRegion()` The Region this index is on
    `IndexStatistics` | `getStatistics()` Get statistics information for this index.
    `IndexType` | `getType()` Get the index type
    `default boolean` | `isValid()` Get whether index is valid to be used in queries.

- - ### Method Detail

    - #### getName

          String getName()

      Returns the unique name of this index
      Returns:
        the unique name of this index

    - #### getType

          IndexType getType()

      Get the index type
      Returns:
        the type of index

    - #### getRegion

          Region<?,?> getRegion()

      The Region this index is on
      Returns:
        the Region for this index

    - #### getStatistics

          IndexStatistics getStatistics()

      Get statistics information for this index.
      Returns:
        statistics information for this index
      Throws:
        `UnsupportedOperationException` - for indexes created on Maps. Example: Index on Maps with expression p['key'].
        On Map type indexes the stats are created at individual key level that can be viewed in VSD stats.

    - #### getFromClause

          String getFromClause()

      Get the original fromClause for this index.
      Returns:
        the original fromClause for this index

    - #### isValid

          default boolean isValid()

      Get whether index is valid to be used in queries.
      Returns:
        whether index is valid to be used in queries

    - #### getCanonicalizedFromClause

          String getCanonicalizedFromClause()

      Get the canonicalized fromClause for this index.
      Returns:
        the canonicalized fromClause for this index

    - #### getIndexedExpression

          String getIndexedExpression()

      Get the original indexedExpression for this index.
      Returns:
        the original indexedExpression for this index

    - #### getCanonicalizedIndexedExpression

          String getCanonicalizedIndexedExpression()

      Get the canonicalized indexedExpression for this index.
      Returns:
        the canonicalized indexedExpression for this index

    - #### getProjectionAttributes

          String getProjectionAttributes()

      Get the original projectionAttributes for this expression.
      Returns:
        the projectionAttributes, or "*" if there were none specified at index creation.

    - #### getCanonicalizedProjectionAttributes

          String getCanonicalizedProjectionAttributes()

      Get the canonicalized projectionAttributes for this expression.
      Returns:
        the projectionAttributes, or "*" if there were none specified at index creation.