chroma-core/chroma · error · ValueError
Schema is missing keys[{embedding_key}].float_list.vector_in
Error message
Schema is missing keys[{embedding_key}].float_list.vector_index What it means
This ValueError from update_schema_from_collection_configuration fires when the schema's '#embedding' key exists but has no float_list.vector_index attached (embedding_value_types.float_list is None or its vector_index is None). The update loop needs the concrete vector-index object to mutate hnsw/spann settings, so a #embedding column that exists but is unindexed cannot be updated and the call is rejected.
Source
Thrown at chromadb/api/collection_configuration.py:843
"""
# Get the vector index from defaults and #embedding key
if (
schema.defaults.float_list is None
or schema.defaults.float_list.vector_index is None
):
raise ValueError("Schema is missing defaults.float_list.vector_index")
embedding_key = "#embedding"
if embedding_key not in schema.keys:
raise ValueError(f"Schema is missing keys[{embedding_key}]")
embedding_value_types = schema.keys[embedding_key]
if (
embedding_value_types.float_list is None
or embedding_value_types.float_list.vector_index is None
):
raise ValueError(
f"Schema is missing keys[{embedding_key}].float_list.vector_index"
)
# Update vector index config in both locations
for vector_index in [
schema.defaults.float_list.vector_index,
embedding_value_types.float_list.vector_index,
]:
if "hnsw" in configuration and configuration["hnsw"] is not None:
# Update HNSW config
if vector_index.config.hnsw is None:
raise ValueError("Trying to update HNSW config but schema has SPANN")
hnsw_config = vector_index.config.hnsw
update_hnsw = configuration["hnsw"]
# Only update fields that are present in the update
if "ef_search" in update_hnsw:View on GitHub (pinned to aecdd12c8a)
Solutions
- Recreate the collection with a full configuration (including the desired vector index) and re-ingest
- Ensure collection creation in your code/version always assigns a vector index to '#embedding' before later modify calls
- Keep client and server versions in sync so schema invariants hold
Defensive patterns
Strategy: try-catch
Validate before calling
def collection_has_indexed_embeddings(collection) -> bool:
cfg = collection.configuration or {}
return cfg.get('hnsw') is not None or cfg.get('spann') is not None
if collection_has_indexed_embeddings(collection):
collection.modify(configuration=update) Try / catch
try:
collection.modify(configuration=update)
except ValueError as e:
if 'float_list.vector_index' in str(e):
# vector index missing from schema: rebuild collection with full config
migrate_to_new_collection(collection)
else:
raise Prevention
- Always create collections with an explicit vector index configuration
- Do not fabricate Schema objects outside chromadb's creation path
- Test modify flows against collections created by the same Chroma version
When it happens
Trigger: Calling collection.modify with an hnsw or spann configuration update on a collection whose '#embedding' key lacks a float_list.vector_index — e.g. an embedding column declared but never assigned an index, a schema built partially in tests, or a collection created by a version/fork that skips index assignment.
Common situations: Schemas from partial migrations or hand-constructed test fixtures; collections whose embeddings were added through non-standard paths; version skew between the client sending updates and the server owning the schema.
Related errors
- Schema is missing defaults.float_list.vector_index
- Schema is missing keys[{embedding_key}]
- Vector index cannot be enabled on specific keys. Use createI
- Deleting vector index is not currently supported.
- Cannot enable all index types globally. Must specify either
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/e253e81c0c5eb41f.
Report an issue: GitHub.