weaviate/weaviate · error
should vectorize: is vector empty
Error message
should vectorize: is vector empty: %w
What it means
In shouldVectorize, when the class's vectorizer is "none" (config.VectorizerModuleNone), Weaviate expects vectors to be supplied by the caller and only checks whether the object already has one. It calls dto.IsVectorEmpty, which switches over the vector's Go type (nil, []float32, [][]float32, C11yVector) and errors with "unrecognized vector type: %T" for anything else. That error is wrapped as "should vectorize: is vector empty". The update is aborted because the provider cannot safely determine vector emptiness.
Solutions
- Look at the wrapped %T message to see the offending vector type; convert it to []float32 (or [][]float32 for multi-vectors) before the update.
- Ensure clients send vectors as standard numeric arrays via the REST/gRPC API rather than through custom deserialization.
- Re-ingest or patch the affected object so its stored vector uses a supported representation.
- If legacy data is involved, re-export and re-import the collection with a current client.
Example fix
// before obj.Vector = myCustomVectorType // unrecognized // after obj.Vector = []float32(myCustomVectorType)
Defensive patterns
Strategy: type-guard
Validate before calling
func hasSupportedVector(obj *models.Object) bool {
switch obj.Vector.(type) {
case nil, []float32, [][]float32, models.C11yVector:
return true
default:
return false
}
}
// call before update; convert otherwise Type guard
func supportedVector(v models.Vector) ([]float32, bool) {
if f, ok := v.([]float32); ok { return f, true }
return nil, false
} Try / catch
err := client.Data().ObjectUpdater()...Do(ctx)
if err != nil && strings.Contains(err.Error(), "is vector empty") {
// convert the vector to []float32 / [][]float32 and resend
} Prevention
- Always send vectors as plain float arrays through official clients.
- Avoid carrying objects built by older/custom deserializers into update calls.
- Add a client-side check that vector fields match models.Vector's supported types.
When it happens
Trigger: UpdateVector on a class with vectorizer=none where the object's vector field (object.Vector or object.Vectors[targetVector]) holds an unexpected concrete type — e.g. legacy C11yVector misuse or a custom vector representation that doesn't match models.Vector's supported cases.
Common situations: Objects deserialized from an older Weaviate version or a custom client sending a non-standard vector type; mixing self-provided vectors with a schema migrated across versions; tests constructing models.Object with an exotic vector type.
Related errors
- AWS Access Key
- cannot revectorize class
- expected []any for , got %T
- expected bool, got %T
- expected float64, got %T
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/c55180398605008a.
Report an issue: GitHub.
Appendix: source
Thrown at usecases/modules/vectorizer.go:458
targetVectorExists = ok && !isVectorEmpty
})
return !targetVectorExists
}
func (p *Provider) shouldVectorize(object *models.Object, class *models.Class,
targetVector string, logger logrus.FieldLogger,
) (bool, error) {
hnswConfig, err := p.getVectorIndexConfig(class, targetVector)
if err != nil {
return false, err
}
vectorizer := p.getVectorizer(class, targetVector)
if vectorizer == config.VectorizerModuleNone {
vector := p.getVector(object, targetVector)
isEmpty, err := dto.IsVectorEmpty(vector)
if err != nil {
return false, fmt.Errorf("should vectorize: is vector empty: %w", err)
}
if hnswConfig.Skip && !isEmpty {
logger.WithField("className", class.Class).
Warningf(warningSkipVectorProvided)
}
return false, nil
}
if hnswConfig.Skip {
logger.WithField("className", class.Class).
WithField("vectorizer", vectorizer).
Warningf(warningSkipVectorGenerated, vectorizer)
}
return true, nil
}
func (p *Provider) getVectorizer(class *models.Class, targetVector string) string {
if targetVector != "" && len(class.VectorConfig) > 0 {View on GitHub (pinned to 75aa4b6d11)