{"record":{"id":"721245ba172b1a92","repo":"chroma-core/chroma","slug":"cannot-enable-all-index-types-globally-must-speci-721245","errorCode":null,"errorMessage":"Cannot enable all index types globally. Must specify either config or key.","messagePattern":"Cannot enable all index types globally\\. Must specify either config or key\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/api/types.py","lineNumber":2138,"sourceCode":"        # Populate with sensible defaults automatically\n        self._initialize_defaults()\n        self._initialize_keys()\n\n    def create_index(\n        self,\n        config: Optional[IndexConfig] = None,\n        key: Optional[Union[str, \"Key\"]] = None,\n    ) -> \"Schema\":\n        \"\"\"Create an index configuration.\"\"\"\n        # Convert Key to string if provided\n        from chromadb.execution.expression.operator import Key as KeyType\n\n        if key is not None and isinstance(key, KeyType):\n            key = key.name\n\n        # Disallow config=None and key=None - too dangerous\n        if config is None and key is None:\n            raise ValueError(\n                \"Cannot enable all index types globally. Must specify either config or key.\"\n            )\n\n        # Disallow using special internal key #embedding\n        if key is not None and key == EMBEDDING_KEY:\n            raise ValueError(\n                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.\"\n            )\n\n        # Only allow #document with FtsIndexConfig\n        if key == DOCUMENT_KEY and not isinstance(config, FtsIndexConfig):\n            raise ValueError(\n                f\"Cannot create index on special key '{key}' with this config. \"\n                \"Only FtsIndexConfig is allowed for #document.\"\n            )\n\n        # Disallow any key starting with # (except #document which allows FTS)\n        if key is not None and key.startswith(\"#\") and key != DOCUMENT_KEY:","sourceCodeStart":2120,"sourceCodeEnd":2156,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/api/types.py#L2120-L2156","documentation":"Error \"Cannot enable all index types globally. Must specify either config or key.\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/api/types.py:2138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}