weaviate/weaviate · error
vectorize move away from
Error message
vectorize move away from: %v
What it means
This error wraps a failure that occurred while computing the vector for the `moveAwayFrom` clause of a nearText search in Weaviate. When a GraphQL/REST query includes `moveAwayFrom` with force > 0 and at least one value or object, the nearText module vectorizes the moved-away concepts (text values via the module's vectorizer, or object UUIDs by fetching their stored vectors). If any of that fails — vectorizer API error, unparseable beacon, or object not found — the underlying error is wrapped with "vectorize move away from: %v" and the whole query fails.
Solutions
- Check the wrapped inner error in the message — it names the real cause (vectorizer auth/network error, bad beacon, or object-not-found).
- Verify the module's API key/env config (e.g. ENABLE_MODULES, X-OpenAI-Api-Key header) by running a plain nearText query without moveAwayFrom; if that also fails, it is a vectorizer configuration problem.
- Validate each beacon/UUID in moveAwayFrom.objects exists and the object has been vectorized (GET the object by id before searching).
- If moving away from an existing object, prefer `moveAwayFrom.objects` with the correct beacon format `weaviate://<host>/<collection>/<uuid>`; if moving away from text, ensure concepts are non-empty strings the vectorizer supports.
Example fix
// before
{
"concepts": ["holiday"],
"moveAwayFrom": {"force": 0.5, "objects": [{"beacon": "weaviate://localhost/bad-uuid"}]}
}
// after (existing, correctly formatted beacon)
{
"concepts": ["holiday"],
"moveAwayFrom": {"force": 0.5, "objects": [{"beacon": "weaviate://localhost/Article/77e5a4b0-..."}]}
} Defensive patterns
Strategy: validation
Validate before calling
// before sending a nearText query with moveAwayFrom
if mt.MoveAwayFrom != nil && mt.MoveAwayFrom.Force > 0 {
if len(mt.MoveAwayFrom.Concepts) == 0 && len(mt.MoveAwayFrom.Objects) == 0 {
return fmt.Errorf("moveAwayFrom: provide concepts or objects when force > 0")
}
for _, c := range mt.MoveAwayFrom.Concepts {
if strings.TrimSpace(c) == "" {
return fmt.Errorf("moveAwayFrom: empty concept")
}
}
for _, o := range mt.MoveAwayFrom.Objects {
// beacon must parse and object must exist with a vector
if !isValidBeacon(o.Beacon) || !objectExistsAndVectorized(ctx, client, o.Beacon) {
return fmt.Errorf("moveAwayFrom: object %q missing or not vectorized", o.Beacon)
}
}
} Type guard
func hasMoveAwayInput(m *MoveAwayFrom) bool {
return m != nil && m.Force > 0 && (len(m.Concepts) > 0 || len(m.Objects) > 0)
} Try / catch
result, err := client.GraphQL().Get().WithNearText(nearText).Do(ctx)
if err != nil {
var apiErr *fault.WeaviateClientError
if errors.As(err, &apiErr) && strings.Contains(apiErr.Msg, "vectorize move away from") {
// fall back to query without moveAwayFrom, or surface the inner cause
return nil, fmt.Errorf("moveAwayFrom rejected: %w", err)
}
return nil, err
} Prevention
- Always test the plain nearText query (no move clauses) first to isolate vectorizer health.
- Resolve object beacons from actual stored UUIDs, never hand-typed.
- Keep the module API key configured server-side so per-request headers are optional.
- Set force > 0 only together with at least one concept or object.
When it happens
Trigger: A nearText search with `{concepts: [...], moveAwayFrom: {force: >0, concepts: [...] or objects: [{id/beacon}]}}` where (a) the vectorizer call for moveAwayFrom.concepts fails (e.g. text2vec API key invalid, network down), (b) a beacon in moveAwayFrom.objects is malformed, or (c) the referenced object does not exist / has no vector (findVectorFn error).
Common situations: Users pass an invalid or expired module API key (OpenAI/Cohere/etc.) so only the moveAwayFrom sub-vectorization fails; they typo a beacon like `weaviate://localhost/uuid` or use a UUID of a deleted object; or they mix concepts that the configured vectorizer cannot embed (e.g. empty strings).
Related errors
- explorer: get class: vectorize params
- AWS Access Key
- cannot revectorize class
- explorer: get class: vectorize search vector
- init graphql provider
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/2579049cb24f82f5.
Report an issue: GitHub.
Appendix: source
Thrown at usecases/modulecomponents/arguments/nearText/searcher.go:86
moveToVector, err := s.vectorFromValuesAndObjects(ctx, moveTo.Values,
moveTo.Objects, className, findVectorFn, cfg, tenant)
if err != nil {
return nil, errors.Errorf("vectorize move to: %v", err)
}
afterMoveTo, err := s.movements.MoveTo(vector, moveToVector, moveTo.Force)
if err != nil {
return nil, err
}
vector = afterMoveTo
}
moveAway := params.MoveAwayFrom
if moveAway.Force > 0 && (len(moveAway.Values) > 0 || len(moveAway.Objects) > 0) {
moveAwayVector, err := s.vectorFromValuesAndObjects(ctx, moveAway.Values,
moveAway.Objects, className, findVectorFn, cfg, tenant)
if err != nil {
return nil, errors.Errorf("vectorize move away from: %v", err)
}
afterMoveFrom, err := s.movements.MoveAwayFrom(vector, moveAwayVector, moveAway.Force)
if err != nil {
return nil, err
}
vector = afterMoveFrom
}
return vector, nil
}
func (s *vectorForParams[T]) vectorFromValuesAndObjects(ctx context.Context,
values []string, objects []ObjectMove,
className string,
findVectorFn modulecapabilities.FindVectorFn[T],
cfg moduletools.ClassConfig, tenant string,
) (T, error) {View on GitHub (pinned to 75aa4b6d11)