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 keyView on GitHub (pinned to aecdd12c8a)
Solutions
- Recreate the collection with a Schema that omits or changes the vector index config, then re-ingest the data.
- To change parameters, apply a new global VectorIndexConfig via createIndex instead of deleting.
- 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
- In this version only FTS on '#document' is a supported delete target — encode that in a wrapper.
- Design reindexing flows around collection recreation, not index deletion.
- Watch the changelog: the TODO in schema.ts marks this restriction as temporary.
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
- Vector index cannot be enabled on specific keys. Use createI
- Deleting sparse vector index is not currently supported.
- Cannot enable all index types globally. Must specify either
- Cannot create index on special key '${key}'. This key is man
- Cannot create index on special key '${key}' with this config
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/aa323f4b600dc777.
Report an issue: GitHub.