weaviate/weaviate · error

the dynamic index can only be created when async indexing is

Error message

the dynamic index can only be created when async indexing is enabled

What it means

Returned by validateVectorIndexTypeBasic when a vector target declares the dynamic index type but the server was not started with async indexing enabled (ASYNC_INDEXING env). Dynamic indexing depends on asynchronous maintenance, so the combination is rejected as an invariant, regardless of other settings.

Source

Thrown at usecases/schema/class.go:1760

	}

	if err := h.vectorizerValidator.ValidateVectorizer(vectorizer); err != nil {
		return errors.Wrap(err, "vectorizer")
	}

	return nil
}

// validateVectorIndexTypeBasic is the per-type correctness gate
// (async-indexing for dynamic, known name).
// Runs unconditionally — these are invariants, not policy.
func (h *Handler) validateVectorIndexTypeBasic(vectorIndexType string) error {
	switch vectorIndexType {
	case vectorindex.VectorIndexTypeHNSW, vectorindex.VectorIndexTypeFLAT:
		return nil
	case vectorindex.VectorIndexTypeDYNAMIC:
		if !h.asyncIndexingEnabled {
			return fmt.Errorf("the dynamic index can only be created when async indexing is enabled")
		}
		return nil
	case vectorindex.VectorIndexTypeHFresh:
		return nil
	default:
		return errors.Errorf("unrecognized or unsupported vectorIndexType %q",
			vectorIndexType)
	}
}

// validateVectorIndexTypeAllowList enforces ALLOWED_VECTOR_INDEX_TYPES.
// Split from the basic check because the grandfather skip applies here.
//
// On a named-vector hnsw rejection the message gets an out-of-date-client
// hint: older clients send vectorIndexType="hnsw" implicitly even when
// the user didn't pick it, so a hfresh-only allow-list rejects requests
// the user never thought they made.
func (h *Handler) validateVectorIndexTypeAllowList(vectorIndexType string, forNamedVector bool) error {

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Start the server with async indexing enabled (ASYNC_INDEXING=true) if dynamic indexes are required
  2. Use the hnsw or flat index type instead when async indexing is off
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at usecases/schema/class.go:1760 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/780c3279806da4c3. Report an issue: GitHub.