@Override
  public void removeIndex(String columnName, IndexType<?, ?, ?> indexType) {
    _indexBuffers.remove(new IndexKey(columnName, indexType));
    if (indexType == StandardIndexes.text()) {
      TextIndexUtils.cleanupTextIndex(_segmentDirectory, columnName);
    } else if (indexType == StandardIndexes.vector()) {
      VectorIndexUtils.cleanupVectorIndex(_segmentDirectory, columnName);
    } else {
      getFilesFor(columnName, indexType).forEach(FileUtils::deleteQuietly);
    }
  }
@Test
  public void testRemoveIndex()
      throws IOException {
    try (FilePerIndexDirectory fpi = new FilePerIndexDirectory(TEMP_DIR, _segmentMetadata, ReadMode.mmap)) {
      fpi.newBuffer("col1", StandardIndexes.forward(), 1024);
      fpi.newBuffer("col2", StandardIndexes.dictionary(), 100);
      assertTrue(fpi.getFileFor("col1", StandardIndexes.forward()).exists());
      assertTrue(fpi.getFileFor("col2", StandardIndexes.dictionary()).exists());
      fpi.removeIndex("col1", StandardIndexes.forward());
      assertFalse(fpi.getFileFor("col1", StandardIndexes.forward()).exists());
    }
  }