chroma-core/chroma · error · ValueError

Schema is missing defaults.float_list.vector_index

Error message

Schema is missing defaults.float_list.vector_index

What it means

This ValueError from update_schema_from_collection_configuration indicates an internal invariant broke: while applying a collection-configuration update, the collection's Schema has no defaults.float_list.vector_index (the object describing how the #embedding column is indexed). Every properly created collection with a vector index has this, so hitting it usually means the schema was constructed outside the normal path, is malformed/None, or the collection predates vector-index defaults.

Source

Thrown at chromadb/api/collection_configuration.py:832

) -> "Schema":
    """
    Updates a schema with configuration changes.
    Only updates fields that are present in the configuration update.

    Args:
        schema: The existing Schema object
        configuration: The configuration updates to apply

    Returns:
        Updated Schema object
    """

    # 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,

View on GitHub (pinned to aecdd12c8a)

Solutions

  1. Create a fresh collection and re-ingest the data instead of modifying the malformed one
  2. Upgrade the Chroma server/client together so collections always carry a complete schema before you call modify
  3. If operating a custom build, ensure collection creation assigns defaults.float_list.vector_index; report the issue upstream if a stock server produces this
  4. Check collection metadata/configuration first and only call modify on collections that expose a vector index

Example fix

// before
old = client.get_collection('legacy_from_v0.4')
old.modify(configuration={'hnsw': {'ef_search': 200}})  # schema lacks vector index

// after
new = client.create_collection('legacy_migrated', configuration={'hnsw': {'ef_search': 200}})
new.add(ids=old.get()['ids'], embeddings=old.get(include=['embeddings'])['embeddings'],
        documents=old.get(include=['documents'])['documents'])
Defensive patterns

Strategy: try-catch

Validate before calling

def collection_supports_index_update(collection) -> bool:
    cfg = collection.configuration or {}
    return 'hnsw' in cfg or 'spann' in cfg or cfg.get('embedding_function') is not None

# heuristic client-side check; the authoritative check is the server schema
if collection_supports_index_update(collection):
    collection.modify(configuration=update)

Try / catch

try:
    collection.modify(configuration=update)
except ValueError as e:
    if 'Schema is missing defaults.float_list.vector_index' in str(e):
        # schema malformed: migrate data into a freshly created collection instead
        migrate_to_new_collection(collection)
    else:
        raise

Prevention

When it happens

Trigger: Calling client.modify_collection/collection.modify with an hnsw or spann update where the server-side Schema object lacks defaults.float_list or defaults.float_list.vector_index — e.g. collections restored from very old Chroma versions, hand-built/test schemas, or a schema where defaults were dropped during a migration. The error is raised before any field updates are applied.

Common situations: Persisted databases created by much older Chroma versions being upgraded in place and then modified; test harnesses that fabricate Schema objects directly; bugs in custom server builds or forks that skip default vector-index assignment at collection creation.

Related errors


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/541694dd80b62ef5. Report an issue: GitHub.