{"record":{"id":"caab1cab9ca30bc8","repo":"weaviate/weaviate","slug":"class-vectorindexconfig-can-not-parse-w","errorCode":null,"errorMessage":"class.VectorIndexConfig can not parse: %w","messagePattern":"class\\.VectorIndexConfig can not parse: %w","errorType":"validation","errorClass":null,"httpStatus":422,"severity":"error","filePath":"usecases/schema/class.go","lineNumber":1565,"sourceCode":"\n// validateCreateUpdateOnlyBounds enforces limits that only apply to schema\n// writes (AddClass/UpdateClass), never to parsing persisted schemas at\n// startup or during RAFT log replay.\nfunc validateCreateUpdateOnlyBounds(parsed schemaConfig.VectorIndexConfig) error {\n\tif uc, ok := parsed.(enthfresh.UserConfig); ok {\n\t\treturn enthfresh.ValidateMuveraUpperBounds(uc)\n\t}\n\treturn nil\n}\n\n// parseLegacyVectorIndexConfig returns the typed VectorIndexConfig for\n// the legacy single-vector class, parsing the raw map form on demand.\n// Returns nil (without error) when the class carries no legacy config.\nfunc (h *Handler) parseLegacyVectorIndexConfig(class *models.Class) (schemaConfig.VectorIndexConfig, error) {\n\tif asMap, ok := class.VectorIndexConfig.(map[string]interface{}); ok && len(asMap) > 0 {\n\t\tparsed, err := h.parser.parseGivenVectorIndexConfig(class.VectorIndexType, class.VectorIndexConfig, h.parser.modules.IsMultiVector(class.Vectorizer), h.config.DefaultQuantization)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"class.VectorIndexConfig can not parse: %w\", err)\n\t\t}\n\t\treturn parsed, nil\n\t}\n\tif typed, ok := class.VectorIndexConfig.(schemaConfig.VectorIndexConfig); ok {\n\t\treturn typed, nil\n\t}\n\treturn nil, nil\n}\n\n// parseNamedVectorIndexConfig parses cfg.VectorIndexConfig on demand —\n// UpdateClass arrives already-typed, AddClass arrives as raw maps.\nfunc (h *Handler) parseNamedVectorIndexConfig(name string, cfg models.VectorConfig) (schemaConfig.VectorIndexConfig, error) {\n\tswitch v := cfg.VectorIndexConfig.(type) {\n\tcase schemaConfig.VectorIndexConfig:\n\t\treturn v, nil\n\tcase map[string]interface{}:\n\t\tisMultiVector := false\n\t\tif vm, ok := cfg.Vectorizer.(map[string]interface{}); ok && len(vm) == 1 {","sourceCodeStart":1547,"sourceCodeEnd":1583,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/schema/class.go#L1547-L1583","documentation":"Wrapped error from parseLegacyVectorIndexConfig when the raw map form of the legacy (single-)vector index config cannot be parsed into the typed schemaConfig.VectorIndexConfig — typically unknown/invalid keys or wrong value types in vectorIndexConfig for the configured index type.","triggerScenarios":"Thrown at usecases/schema/class.go:1565 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check vectorIndexConfig keys against the documented options for the index type","Fix value types (e.g. numbers where booleans are expected)","Inspect the wrapped parse error to identify the offending key"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}