public int removeIndexes() {
    // Remove indexes which are available (create completed).
    int numIndexes = 0;
    for (final Object o : indexes.entrySet()) {
      Map.Entry entry = (Map.Entry) o;
      Object ind = entry.getValue();
      // 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)) {
        continue;
      }
      numIndexes++;
      IndexTask indexTask = (IndexTask) entry.getKey();
      indexes.remove(indexTask);
    }
    return numIndexes;
  }
Remove all the indexes managed by IndexManager
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java