weaviate/weaviate · error
parse vector config: %w
Error message
parse vector config: %w
What it means
UpdateClassInternal calls parser.parseVectorConfig separately from ParseClass (BC reasons, gh-5860). Invalid vector index configuration — bad HNSW/flat/dynamic parameters, invalid type/values — aborts the update with this wrapped error.
Source
Thrown at usecases/schema/class.go:584
return fmt.Errorf("ObjectTTLConfig: %w", err)
} else {
updated.ObjectTTLConfig = ttlConfig
}
if err := h.parser.ParseClass(updated); err != nil {
return err
}
// ideally, these calls would be encapsulated in ParseClass but ParseClass is
// used in many different areas of the codebase that may cause BC issues with the
// new validation logic. Issue ref: gh-5860
// As our testing becomes more comprehensive, we can move these calls into ParseClass
if err := h.parser.parseModuleConfig(updated); err != nil {
return fmt.Errorf("parse module config: %w", err)
}
if err := h.parser.parseVectorConfig(updated); err != nil {
return fmt.Errorf("parse vector config: %w", err)
}
// Initial class is read up-front for the grandfather-on-tighten skip
// in validateVectorSettingsAgainst.
initial := h.schemaReader.ReadOnlyClass(className)
if err := rejectVectorIndexTypeNone(initial, updated); err != nil {
vclasses, qErr := h.schemaManager.QueryReadOnlyClasses(className)
if qErr != nil {
return err
}
consistent, ok := vclasses[className]
if !ok || consistent.Class == nil {
return err
}
if err := rejectVectorIndexTypeNone(consistent.Class, updated); err != nil {
return err
}View on GitHub (pinned to 75aa4b6d11)
Solutions
- Fix the invalid vectorIndexConfig field named in the inner error (types, ranges)
- Ensure vectorIndexConfig options match the configured vectorIndexType
- Omit vectorIndexConfig to keep defaults when not changing vector settings
- Validate compression parameters (segments, centroids, trainingLimit) against current docs
Example fix
// before
"vectorIndexConfig": {"ef": "128"}
// after
"vectorIndexConfig": {"ef": 128} Defensive patterns
Strategy: validation
Validate before calling
import "encoding/json"
func validVectorConfig(class *models.Class) error {
raw, _ := json.Marshal(class.VectorIndexConfig)
var m map[string]json.Number
if err := json.Unmarshal(raw, &m); err != nil { return err }
for _, k := range []string{"ef", "efConstruction", "maxConnections"} {
if v, ok := m[k]; ok {
if _, err := v.Int64(); err != nil { return fmt.Errorf("%s must be numeric", k) }
}
}
return nil
} Try / catch
err := client.Schema().ClassUpdater().WithClassName(name).WithClass(payload).Do(ctx)
if err != nil && strings.Contains(err.Error(), "parse vector config") {
// fix the vectorIndexConfig field or omit it to keep defaults
} Prevention
- Send numeric values (not strings) for vectorIndexConfig parameters
- Match vectorIndexConfig options to the configured vectorIndexType
- Omit vectorIndexConfig in updates unless intentionally changing vector settings
- Validate compression (PQ/BQ/SQ) parameters against the target version's docs
When it happens
Trigger: PUT /v1/schema/{class} whose vectorIndexConfig contains invalid values — e.g. non-numeric ef/eFConstruction, invalid maxConnections, bad compression (PQ/BQ/SQ) settings, or entries inconsistent with vectorIndexType.
Common situations: Typos in vector index parameters; wrong types (strings instead of numbers) from templated JSON; compression settings copied from incompatible versions; mixing flat/HNSW-specific options.
Related errors
- invalid index type: %s
- invalid update for vector %q: %w
- invalid vector index %q. Supported types are hnsw and flat
- vector %q: cannot create a new class with vectorIndexType %q
- vector %q: vectorIndexType %q is an internal sentinel for dr
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/a22ea45284353c8d.
Report an issue: GitHub.