weaviate/weaviate · error

class.VectorIndexConfig can not parse: %w

Error message

class.VectorIndexConfig can not parse: %w

What it means

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.

Source

Thrown at usecases/schema/class.go:1565

// validateCreateUpdateOnlyBounds enforces limits that only apply to schema
// writes (AddClass/UpdateClass), never to parsing persisted schemas at
// startup or during RAFT log replay.
func validateCreateUpdateOnlyBounds(parsed schemaConfig.VectorIndexConfig) error {
	if uc, ok := parsed.(enthfresh.UserConfig); ok {
		return enthfresh.ValidateMuveraUpperBounds(uc)
	}
	return nil
}

// parseLegacyVectorIndexConfig returns the typed VectorIndexConfig for
// the legacy single-vector class, parsing the raw map form on demand.
// Returns nil (without error) when the class carries no legacy config.
func (h *Handler) parseLegacyVectorIndexConfig(class *models.Class) (schemaConfig.VectorIndexConfig, error) {
	if asMap, ok := class.VectorIndexConfig.(map[string]interface{}); ok && len(asMap) > 0 {
		parsed, err := h.parser.parseGivenVectorIndexConfig(class.VectorIndexType, class.VectorIndexConfig, h.parser.modules.IsMultiVector(class.Vectorizer), h.config.DefaultQuantization)
		if err != nil {
			return nil, fmt.Errorf("class.VectorIndexConfig can not parse: %w", err)
		}
		return parsed, nil
	}
	if typed, ok := class.VectorIndexConfig.(schemaConfig.VectorIndexConfig); ok {
		return typed, nil
	}
	return nil, nil
}

// parseNamedVectorIndexConfig parses cfg.VectorIndexConfig on demand —
// UpdateClass arrives already-typed, AddClass arrives as raw maps.
func (h *Handler) parseNamedVectorIndexConfig(name string, cfg models.VectorConfig) (schemaConfig.VectorIndexConfig, error) {
	switch v := cfg.VectorIndexConfig.(type) {
	case schemaConfig.VectorIndexConfig:
		return v, nil
	case map[string]interface{}:
		isMultiVector := false
		if vm, ok := cfg.Vectorizer.(map[string]interface{}); ok && len(vm) == 1 {

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Check vectorIndexConfig keys against the documented options for the index type
  2. Fix value types (e.g. numbers where booleans are expected)
  3. Inspect the wrapped parse error to identify the offending key
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at usecases/schema/class.go:1565 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/caab1cab9ca30bc8. Report an issue: GitHub.