chroma-core/chroma · error · Error
Cannot modify #embedding. Currently not supported
Error message
Cannot modify #embedding. Currently not supported
What it means
'#embedding' holds the collection's vectors and is configured automatically by the Schema class, so deleteIndex refuses to touch it: modification of '#embedding' is currently not supported at all. Vector index settings are changed by applying a new global config via createIndex, never by deleting the '#embedding' index.
Source
Thrown at clients/new-js/packages/chromadb/src/schema.ts:596
this.setIndexForKey(key, config as IndexConfig, true);
}
return this;
}
deleteIndex(config?: IndexConfig, key?: string): this {
const configProvided = config !== undefined && config !== null;
const keyProvided = key !== undefined && key !== null;
if (!configProvided && !keyProvided) {
throw new Error(
"Cannot disable all indexes. Must specify either config or key.",
);
}
// Disallow using special internal key #embedding
if (keyProvided && key && key === EMBEDDING_KEY) {
throw new Error("Cannot modify #embedding. Currently not supported");
}
// Only allow #document with FtsIndexConfig (to disable FTS)
if (
keyProvided &&
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.",
);View on GitHub (pinned to aecdd12c8a)
Solutions
- Do not target '#embedding' with deleteIndex; removing the embedding key's index is not supported.
- To change vector index settings, apply a new global config: createIndex(new VectorIndexConfig(...)) with no key.
- To fully remove it, recreate the collection with a schema built without the vector index.
Example fix
// before schema.deleteIndex(cfg, '#embedding'); // after schema.createIndex(new VectorIndexConfig()); // reconfigure globally instead of deleting
Defensive patterns
Strategy: validation
Validate before calling
function deleteIndexGuarded(schema: Schema, config: IndexConfig, key: string): void {
if (key === '#embedding') {
throw new Error('#embedding cannot be modified — apply a global VectorIndexConfig instead');
}
schema.deleteIndex(config, key);
} Type guard
const isProtectedKey = (key: string): boolean => key === '#embedding';
Try / catch
try {
schema.deleteIndex(config, key);
} catch (e) {
if (e instanceof Error && e.message === 'Cannot modify #embedding. Currently not supported') {
// skip system keys during teardown
} else {
throw e;
}
} Prevention
- Always exclude '#embedding' from delete/modify loops.
- Change vector index behavior via global createIndex, never by deleting the embedding index.
When it happens
Trigger: schema.deleteIndex(cfg, '#embedding'); schema.deleteIndex(undefined, '#embedding'); iterating Object.keys(schema.keys) and calling deleteIndex on every key including system keys.
Common situations: Programmatic teardown loops over all schema keys; attempting to disable vector search by deleting the embedding index (separately blocked by the vector-delete restriction).
Related errors
- Cannot create index on special key '${key}'. This key is man
- key cannot begin with '#'. Keys starting with '#' are reserv
- Cannot enable all index types globally. Must specify either
- Cannot create index on special key '${key}' with this config
- Vector index cannot be enabled on specific keys. Use createI
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/8adb3fb765082ce1.
Report an issue: GitHub.