{"record":{"id":"0f62993fff2ac6d3","repo":"weaviate/weaviate","slug":"object-d-w","errorCode":null,"errorMessage":"object %d: %w","messagePattern":"object (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/text2vec-contextionary/additional/sempath/builder.go","lineNumber":87,"sourceCode":"\n\tif params == nil {\n\t\treturn nil, fmt.Errorf(\"no params provided\")\n\t}\n\n\tdims := len(in[0].Vector)\n\tif err := params.SetDefaultsAndValidate(len(in), dims); err != nil {\n\t\treturn nil, errors.Wrap(err, \"invalid params\")\n\t}\n\n\tsearchNeighbors, err := pb.addSearchNeighbors(params)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor i, obj := range in {\n\t\tpath, err := pb.calculatePathPerObject(obj, in, params, searchNeighbors)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"object %d: %w\", i, err)\n\t\t}\n\n\t\tif in[i].AdditionalProperties == nil {\n\t\t\tin[i].AdditionalProperties = models.AdditionalProperties{}\n\t\t}\n\n\t\tin[i].AdditionalProperties[\"semanticPath\"] = path\n\t}\n\n\treturn in, nil\n}\n\nfunc (pb *PathBuilder) calculatePathPerObject(obj search.Result, allObjects []search.Result, params *Params,\n\tsearchNeighbors []*txt2vecmodels.NearestNeighbor,\n) (*txt2vecmodels.SemanticPath, error) {\n\tdims := len(obj.Vector)\n\tmatrix, neighbors, err := pb.vectorsToMatrix(obj, allObjects, dims, params, searchNeighbors)\n\tif err != nil {","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/text2vec-contextionary/additional/sempath/builder.go#L69-L105","documentation":"CalculatePath computes the path per input object in a loop; if any per-object computation fails, it wraps the inner error as 'object <i>: ...' to identify which search result broke the batch. The message identifies the failing object index; the root cause is in the wrapped inner error.","triggerScenarios":"Any failure inside calculatePathPerObject for the i-th result — t-SNE embedding failure, inconsistent vector lengths (see vectorsToMatrix errors), nil neighbors — during a semanticPath query over multiple results.","commonSituations":"One malformed object (wrong dimensions, missing neighbors) in an otherwise valid semanticPath query; the index tells you which search result to inspect.","solutions":["Read the wrapped inner error after 'object <i>:' to find the actual cause","Inspect/repair the object at the reported index (fix its vector dimensions or re-vectorize it)","Re-run the semanticPath query once the offending object is fixed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"res, err := builder.CalculatePath(in, params)\nif err != nil {\n  var idx int\n  if n, _ := fmt.Sscanf(err.Error(), \"object %d:\", &idx); n == 1 {\n    // inspect/fix search result at index idx, then retry without it\n  }\n  return err\n}","preventionTips":["Keep object vectors dimensionally consistent across the collection","Re-vectorize objects after changing vectorizer settings","Log the failing object ID alongside the index"],"tags":["go","vectorizer","additional-properties"],"backgroundTag":"batch-item-failure","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"}