@Override
  public Index getIndex(Region region, String indexName) {

    if (pool != null) {
      throw new UnsupportedOperationException(
          "Index Operation is not supported on the Server Region.");
    }

    // A Partition Region does not have an IndexManager, but it's buckets have.
    if (region instanceof PartitionedRegion) {
      return (Index) ((PartitionedRegion) region).getIndex().get(indexName);
    } else {
      IndexManager indexManager = IndexUtils.getIndexManager(cache, region, false);
      if (indexManager == null) {
        return null;
      }
      return indexManager.getIndex(indexName);
    }
  }
Asif : Gets an exact match index ( match level 0)

@param regionPath String containing the region name
@param definitions An array of String objects containing canonicalized definitions of
       RuntimeIterators. A Canonicalized definition of a RuntimeIterator is the canonicalized
       expression obtainded from its underlying collection expression.
@param indexType IndexType object which can be either of type RangeIndex or PrimaryKey Index
@param indexedExpression CompiledValue containing the path expression on which index needs to
       be created
@param context ExecutionContext
@return IndexData object
geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQueryService.java