{"record":{"id":"8a08012398ab66c6","repo":"weaviate/weaviate","slug":"have-no-potential-targets-for-property-s","errorCode":null,"errorMessage":"have no potential targets for property '%s'","messagePattern":"have no potential targets for property '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/text2vec-contextionary/classification/classifier_run_contextual.go","lineNumber":116,"sourceCode":"\n\t\t// append list of actually classified (can differ from scope!) properties,\n\t\t// so we can build the object meta information\n\t\tclassified = append(classified, current)\n\t}\n\n\tc.classifier.extendItemWithObjectMeta(&c.item, c.params, classified)\n\terr := c.writer.Store(c.item)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"store %s/%s: %w\", c.item.ClassName, c.item.ID, err)\n\t}\n\n\treturn nil\n}\n\nfunc (c *contextualItemClassifier) property(propName string) (string, error) {\n\ttargets, ok := c.context.targets[propName]\n\tif !ok || len(targets) == 0 {\n\t\treturn \"\", fmt.Errorf(\"have no potential targets for property '%s'\", propName)\n\t}\n\n\tschemaMap, ok := c.item.Schema.(map[string]interface{})\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"no or incorrect schema map present on source c.object '%s': %T\", c.item.ID, c.item.Schema)\n\t}\n\n\t// Limitation for now, basedOnProperty is always 0\n\tbasedOnName := c.params.BasedOnProperties[0]\n\tbasedOn, ok := schemaMap[basedOnName]\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"property '%s' not found on source c.object '%s': %T\", propName, c.item.ID, c.item.Schema)\n\t}\n\n\tbasedOnString, ok := basedOn.(string)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"property '%s' present on %s, but of unexpected type: want string, got %T\",\n\t\t\tbasedOnName, c.item.ID, basedOn)","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/text2vec-contextionary/classification/classifier_run_contextual.go#L98-L134","documentation":"The property being classified has no entry, or an empty target list, in the pre-computed targets map built by the preparer (findTargetsForProps). The classifier cannot determine which classes this property's references may point to.","triggerScenarios":"ClassifyProperties includes a property that is not a cross-reference property at all, or whose ref dataType yielded zero target classes (e.g. dataType empty or pointing at nothing resolvable).","commonSituations":"Submitting a contextual classification job classifying a text (non-ref) property; a ref property with a broken/missing dataType; config copy-pasted from a different schema.","solutions":["Only pass reference (ref-type) properties to classifyProperties for contextual classification","Check GET /v1/schema/{class} that the property has a valid dataType listing existing classes","Re-submit the job with corrected properties"],"exampleFix":"// before\nwithClassifyProperties([\"description\"]) // description is text, not a ref\n// after\nwithClassifyProperties([\"ofCategory\"]) // ofCategory is a ref property with dataType [\"Category\"]","handlingStrategy":"validation","validationCode":"const cls = (await client.schema.getter().do()).classes.find(c => c.class === className);\nconst bad = classifyProps.filter(name => !cls.properties.some(p => p.name === name && p.dataType?.length));\nif (bad.length) throw new Error(`not valid ref props: ${bad}`);","typeGuard":"function hasRefTargets(prop) { return Array.isArray(prop.dataType) && prop.dataType.length > 0; }","tryCatchPattern":null,"preventionTips":["Only pass cross-reference properties to classifyProperties","Check the preparer's target resolution by classifying one object first","Keep ref dataTypes valid in the schema"],"tags":["weaviate","classification","schema","reference"],"backgroundTag":"no-ref-targets-for-property","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"}