chroma-core/chroma · error · Error

Deleting vector index is not currently supported.

Error message

Deleting vector index is not currently supported.

What it means

Deleting the vector index — globally or on any key — is temporarily unsupported; the source marks the restriction with a TODO indicating it may be lifted in a future version. Any deleteIndex call whose config is a VectorIndexConfig throws before anything is removed.

Source

Thrown at clients/new-js/packages/chromadb/src/schema.ts:620

      key === DOCUMENT_KEY &&
      !(config instanceof FtsIndexConfig)
    ) {
      throw new Error(
        `Cannot delete index on special key '${key}' with this config. Only FtsIndexConfig is allowed for #document.`,
      );
    }

    // Disallow any key starting with # (except #document which allows FTS deletion)
    if (keyProvided && key && key.startsWith("#") && key !== DOCUMENT_KEY) {
      throw new Error(
        "key cannot begin with '#'. Keys starting with '#' are reserved for system use.",
      );
    }

    // TODO: Consider removing these checks in the future to allow disabling vector and sparse vector indexes
    // Temporarily disallow deleting vector index (both globally and per-key)
    if (config instanceof VectorIndexConfig) {
      throw new Error("Deleting vector index is not currently supported.");
    }

    // Temporarily disallow deleting sparse vector index (both globally and per-key)
    if (config instanceof SparseVectorIndexConfig) {
      throw new Error(
        "Deleting sparse vector index is not currently supported.",
      );
    }

    // FTS deletion is only allowed on #document key
    if (
      config instanceof FtsIndexConfig &&
      (!keyProvided || key !== DOCUMENT_KEY)
    ) {
      throw new Error("Deleting FTS index is only supported on #document key.");
    }

    // TODO: Consider removing this check in the future to allow disabling all indexes for a key

View on GitHub (pinned to aecdd12c8a)

Solutions

  1. Recreate the collection with a Schema that omits or changes the vector index config, then re-ingest the data.
  2. To change parameters, apply a new global VectorIndexConfig via createIndex instead of deleting.
  3. Track the client changelog — the TODO in schema.ts signals deletion support may arrive later.

Example fix

// before
schema.deleteIndex(new VectorIndexConfig()); // throws

// after
const freshSchema = new Schema(); // rebuild without the vector index override
await client.createCollection({ name: name + '_v2', schema: freshSchema });
// then re-ingest documents into the new collection
Defensive patterns

Strategy: fallback

Validate before calling

function assertDeletableIndex(config: IndexConfig): void {
  if (config instanceof VectorIndexConfig) {
    throw new Error('Vector index deletion is unsupported — recreate the collection instead');
  }
}

Type guard

const isDeletableIndex = (config: IndexConfig): boolean =>
  !(config instanceof VectorIndexConfig);

Try / catch

try {
  schema.deleteIndex(config, key);
} catch (e) {
  if (e instanceof Error && e.message === 'Deleting vector index is not currently supported.') {
    // fall back: create a new collection with the desired schema and re-ingest
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: schema.deleteIndex(new VectorIndexConfig()); schema.deleteIndex(new VectorIndexConfig(), 'any_key'); cleanup or migration scripts written against an assumed deletion API.

Common situations: Reset/reindex workflows that try to strip indexes before re-adding them; toggling ANN search off during bulk writes; scripts written for a newer client version run against this one.

Related errors


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/aa323f4b600dc777. Report an issue: GitHub.