chroma-core/chroma · error · ValueError
Cannot enable all index types globally. Must specify either
Error message
Cannot enable all index types globally. Must specify either config or key.
What it means
Error "Cannot enable all index types globally. Must specify either config or key." thrown in chroma-core/chroma.
Source
Thrown at chromadb/api/types.py:2138
# Populate with sensible defaults automatically
self._initialize_defaults()
self._initialize_keys()
def create_index(
self,
config: Optional[IndexConfig] = None,
key: Optional[Union[str, "Key"]] = None,
) -> "Schema":
"""Create an index configuration."""
# Convert Key to string if provided
from chromadb.execution.expression.operator import Key as KeyType
if key is not None and isinstance(key, KeyType):
key = key.name
# Disallow config=None and key=None - too dangerous
if config is None and key is None:
raise ValueError(
"Cannot enable all index types globally. Must specify either config or key."
)
# Disallow using special internal key #embedding
if key is not None and key == EMBEDDING_KEY:
raise ValueError(
f"Cannot create index on special key '{key}'. This key is managed automatically by the system. Invoke create_index(VectorIndexConfig(...)) without specifying a key to configure the vector index globally."
)
# Only allow #document with FtsIndexConfig
if key == DOCUMENT_KEY and not isinstance(config, FtsIndexConfig):
raise ValueError(
f"Cannot create index on special key '{key}' with this config. "
"Only FtsIndexConfig is allowed for #document."
)
# Disallow any key starting with # (except #document which allows FTS)
if key is not None and key.startswith("#") and key != DOCUMENT_KEY:View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at chromadb/api/types.py:2138 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/721245ba172b1a92.
Report an issue: GitHub.