public int removeIndex(String indexName) throws CacheException, ForceReattemptException {
    int numBuckets = 0;
    // remotely originated removeindex
    Object ind = indexes.get(indexName);

    // Check if the returned value is instance of Index (this means the index is
    // not in create phase, its created successfully).
    if (ind instanceof Index) {
      numBuckets = removeIndex((Index) indexes.get(indexName), true);
    }
    return numBuckets;
  }
Gets and removes index by name.

@param indexName name of the index to be removed.
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java