weaviate/weaviate · error

multiple multi vectors with incompatible dimensions found fo

Error message

multiple multi vectors with incompatible dimensions found for target: %s

What it means

Thrown by crossClassFindMultiVector in the default (multiple results) branch: when more than one object is resolved by the nearObject lookup for a multi-vector query, the code cannot combine multi-vectors, so it unconditionally reports incompatible dimensions for the target. It is returned regardless of the targetVector value (empty or set).

Source

Thrown at usecases/traverser/near_params_vector.go:443

			if len(res[0].Vectors) == 0 || res[0].Vectors[targetVector] == nil {
				return nil, "", fmt.Errorf("multi vector not found for target: %v", targetVector)
			}
		} else {
			if len(res[0].Vectors) == 1 {
				for key, vec := range res[0].Vectors {
					v, ok := vec.([][]float32)
					if !ok {
						return nil, "", fmt.Errorf("unrecognized multi vector type: %T", vec)
					}
					return v, key, nil
				}
			} else if len(res[0].Vectors) > 1 {
				return nil, "", errors.New("multiple multi vectors found, specify target vector")
			}
		}
		return nil, "", fmt.Errorf("multi vector not found for target: %v", targetVector)
	default:
		return nil, "", fmt.Errorf("multiple multi vectors with incompatible dimensions found for target: %s", targetVector)
	}
}

func (v *nearParamsVector) crossClassVectorFromNearObjectParams(ctx context.Context,
	params *searchparams.NearObject,
) (models.Vector, string, error) {
	return v.vectorFromNearObjectParams(ctx, "", params, "", "")
}

func (v *nearParamsVector) vectorFromNearObjectParams(ctx context.Context,
	className string, params *searchparams.NearObject, tenant, targetVector string,
) (models.Vector, string, error) {
	if len(params.ID) == 0 && len(params.Beacon) == 0 {
		return nil, "", errors.New("empty id and beacon")
	}

	var id strfmt.UUID
	targetClassName := className

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Ensure the nearObject reference (beacon/id) uniquely identifies one object; fix duplicate objects with the same UUID in the referenced collection.
  2. Use the single-vector nearObject path if the collection is not truly multi-vector, since that branch supports combining multiple results.
  3. Check for replication/import anomalies that produced duplicate IDs and clean them up.
  4. Specify a precise beacon to the correct class so resolution returns a single object.
Defensive patterns

Strategy: fallback

Validate before calling

// Ensure beacon resolves to exactly one object before using multi-vector nearObject:
objs, _ := findObjectsByBeacon(beacon)
if len(objs) != 1 {
    return fmt.Errorf("beacon %s resolves to %d objects", beacon, len(objs))
}

Try / catch

if err != nil && strings.Contains(err.Error(), "incompatible dimensions") {
    // fall back to single-vector nearObject path or deduplicate the referenced objects
}

Prevention

When it happens

Trigger: nearObject beacon/id resolution returning multiple objects (len(res) > 1) on the multi-vector path — e.g. ambiguous cross-class beacon resolution or a search returning several matches — while running findMultiVector.

Common situations: Cross-class nearObject references where the beacon resolves to multiple candidates; data anomalies after failed imports or replication creating duplicate objects for the same ID; querying with the multi-vector path where the single-vector path (which combines vectors) is expected.

Related errors


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