{"record":{"id":"95096f16b708fa38","repo":"weaviate/weaviate","slug":"multiple-multi-vectors-with-incompatible-dimension","errorCode":null,"errorMessage":"multiple multi vectors with incompatible dimensions found for target: %s","messagePattern":"multiple multi vectors with incompatible dimensions found for target: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/traverser/near_params_vector.go","lineNumber":443,"sourceCode":"\t\t\tif len(res[0].Vectors) == 0 || res[0].Vectors[targetVector] == nil {\n\t\t\t\treturn nil, \"\", fmt.Errorf(\"multi vector not found for target: %v\", targetVector)\n\t\t\t}\n\t\t} else {\n\t\t\tif len(res[0].Vectors) == 1 {\n\t\t\t\tfor key, vec := range res[0].Vectors {\n\t\t\t\t\tv, ok := vec.([][]float32)\n\t\t\t\t\tif !ok {\n\t\t\t\t\t\treturn nil, \"\", fmt.Errorf(\"unrecognized multi vector type: %T\", vec)\n\t\t\t\t\t}\n\t\t\t\t\treturn v, key, nil\n\t\t\t\t}\n\t\t\t} else if len(res[0].Vectors) > 1 {\n\t\t\t\treturn nil, \"\", errors.New(\"multiple multi vectors found, specify target vector\")\n\t\t\t}\n\t\t}\n\t\treturn nil, \"\", fmt.Errorf(\"multi vector not found for target: %v\", targetVector)\n\tdefault:\n\t\treturn nil, \"\", fmt.Errorf(\"multiple multi vectors with incompatible dimensions found for target: %s\", targetVector)\n\t}\n}\n\nfunc (v *nearParamsVector) crossClassVectorFromNearObjectParams(ctx context.Context,\n\tparams *searchparams.NearObject,\n) (models.Vector, string, error) {\n\treturn v.vectorFromNearObjectParams(ctx, \"\", params, \"\", \"\")\n}\n\nfunc (v *nearParamsVector) vectorFromNearObjectParams(ctx context.Context,\n\tclassName string, params *searchparams.NearObject, tenant, targetVector string,\n) (models.Vector, string, error) {\n\tif len(params.ID) == 0 && len(params.Beacon) == 0 {\n\t\treturn nil, \"\", errors.New(\"empty id and beacon\")\n\t}\n\n\tvar id strfmt.UUID\n\ttargetClassName := className","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/traverser/near_params_vector.go#L425-L461","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Ensure the nearObject reference (beacon/id) uniquely identifies one object; fix duplicate objects with the same UUID in the referenced collection.","Use the single-vector nearObject path if the collection is not truly multi-vector, since that branch supports combining multiple results.","Check for replication/import anomalies that produced duplicate IDs and clean them up.","Specify a precise beacon to the correct class so resolution returns a single object."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Ensure beacon resolves to exactly one object before using multi-vector nearObject:\nobjs, _ := findObjectsByBeacon(beacon)\nif len(objs) != 1 {\n    return fmt.Errorf(\"beacon %s resolves to %d objects\", beacon, len(objs))\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"incompatible dimensions\") {\n    // fall back to single-vector nearObject path or deduplicate the referenced objects\n}","preventionTips":["Keep UUIDs unique across imported objects; detect duplicates during ingestion.","Use precise beacons that include the target class.","Monitor replication health so duplicate IDs don't appear after partial failures."],"tags":["go","vector-search","multi-vector","vector-dimensions"],"backgroundTag":"incompatible-vector-dimensions","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}