weaviate/weaviate · error

have no potential targets for property '%s'

Error message

have no potential targets for property '%s'

What it means

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.

Source

Thrown at modules/text2vec-contextionary/classification/classifier_run_contextual.go:116

		// append list of actually classified (can differ from scope!) properties,
		// so we can build the object meta information
		classified = append(classified, current)
	}

	c.classifier.extendItemWithObjectMeta(&c.item, c.params, classified)
	err := c.writer.Store(c.item)
	if err != nil {
		return fmt.Errorf("store %s/%s: %w", c.item.ClassName, c.item.ID, err)
	}

	return nil
}

func (c *contextualItemClassifier) property(propName string) (string, error) {
	targets, ok := c.context.targets[propName]
	if !ok || len(targets) == 0 {
		return "", fmt.Errorf("have no potential targets for property '%s'", propName)
	}

	schemaMap, ok := c.item.Schema.(map[string]interface{})
	if !ok {
		return "", fmt.Errorf("no or incorrect schema map present on source c.object '%s': %T", c.item.ID, c.item.Schema)
	}

	// Limitation for now, basedOnProperty is always 0
	basedOnName := c.params.BasedOnProperties[0]
	basedOn, ok := schemaMap[basedOnName]
	if !ok {
		return "", fmt.Errorf("property '%s' not found on source c.object '%s': %T", propName, c.item.ID, c.item.Schema)
	}

	basedOnString, ok := basedOn.(string)
	if !ok {
		return "", fmt.Errorf("property '%s' present on %s, but of unexpected type: want string, got %T",
			basedOnName, c.item.ID, basedOn)

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Only pass reference (ref-type) properties to classifyProperties for contextual classification
  2. Check GET /v1/schema/{class} that the property has a valid dataType listing existing classes
  3. Re-submit the job with corrected properties

Example fix

// before
withClassifyProperties(["description"]) // description is text, not a ref
// after
withClassifyProperties(["ofCategory"]) // ofCategory is a ref property with dataType ["Category"]
Defensive patterns

Strategy: validation

Validate before calling

const cls = (await client.schema.getter().do()).classes.find(c => c.class === className);
const bad = classifyProps.filter(name => !cls.properties.some(p => p.name === name && p.dataType?.length));
if (bad.length) throw new Error(`not valid ref props: ${bad}`);

Type guard

function hasRefTargets(prop) { return Array.isArray(prop.dataType) && prop.dataType.length > 0; }

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


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