weaviate/weaviate · error

the object is invalid, as weaviate could not extract any con

Error message

the object is invalid, as weaviate could not extract any contextionary-valid words from it. This is the case when you have set the options 'vectorizeClassName: false' and 'vectorizePropertyName: false' in this class' schema definition and not a single property's value contains at least one contextionary-valid word. To fix this, you have several options:

1.) Make sure that the schema class name or the set properties are a contextionary-valid term and include them in vectorization using the 'vectorizeClassName' or 'vectorizePropertyName' setting. In this case the vector position will be composed of both the class/property names and the values for those fields. Even if no property values are contextionary-valid, the overall word corpus is still valid due to the contextionary-valid class/property names.

2.) Alternatively, if you do not want to include schema class/property names in vectorization, you must make sure that at least one text/string property contains at least one contextionary-valid word.

3.) If the word corpus weaviate extracted from your object (see below) does contain enough meaning to build a vector position, but the contextionary did not recognize the words, you can extend the contextionary using the REST API. This is the case	when you use mostly industry-specific terms which are not known to the common language contextionary. Once extended, simply reimport this object.

The following words were extracted from your object: %v

To learn more about the contextionary and how it behaves, check out: https://www.semi.technology/documentation/weaviate/current/contextionary.html

Original error: %v

What it means

Object() calls the contextionary client's VectorForCorpi and, when the returned error matches the typed ErrNoUsableWords, replaces it with this long user-facing explanation. It means vectorization failed because no extracted word was contextionary-valid, typically when both vectorizeClassName and vectorizePropertyName are false and no property value contains a valid word. The original error (with the extracted words) is appended via 'Original error: %v'.

Source

Thrown at modules/text2vec-contextionary/vectorizer/vectorizer.go:111

	return vec, additional, nil
}

func (v *Vectorizer) object(ctx context.Context, object *models.Object, overrides map[string]string,
	cfg moduletools.ClassConfig,
) ([]float32, []txt2vecmodels.InterpretationSource, error) {
	icheck := NewIndexChecker(cfg)
	corpi, isEmpty := v.objectVectorizer.Texts(ctx, object, icheck)
	if isEmpty {
		// don't vectorize empty text
		return nil, nil, nil
	}

	vector, ie, err := v.client.VectorForCorpi(ctx, []string{corpi}, overrides)
	if err != nil {
		switch {
		case errors.As(err, &ErrNoUsableWords{}):
			return nil, nil, fmt.Errorf("the object is invalid, as weaviate could not extract "+
				"any contextionary-valid words from it. This is the case when you have "+
				"set the options 'vectorizeClassName: false' and 'vectorizePropertyName: false' in this class' schema definition "+
				"and not a single property's value "+
				"contains at least one contextionary-valid word. To fix this, you have several "+
				"options:\n\n1.) Make sure that the schema class name or the set properties are "+
				"a contextionary-valid term and include them in vectorization using the "+
				"'vectorizeClassName' or 'vectorizePropertyName' setting. In this case the vector position "+
				"will be composed of both the class/property names and the values for those fields. "+
				"Even if no property values are contextionary-valid, the overall word corpus is still valid "+
				"due to the contextionary-valid class/property names."+
				"\n\n2.) Alternatively, if you do not want to include schema class/property names "+
				"in vectorization, you must make sure that at least one text/string property contains "+
				"at least one contextionary-valid word."+
				"\n\n3.) If the word corpus weaviate extracted from your object "+
				"(see below) does contain enough meaning to build a vector position, but the contextionary "+
				"did not recognize the words, you can extend the contextionary using the "+
				"REST API. This is the case	when you use mostly industry-specific terms which are "+
				"not known to the common language contextionary. Once extended, simply reimport this object."+

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Set vectorizeClassName or vectorizePropertyName to true in the class schema so valid schema words contribute to the corpus
  2. Make sure at least one text/string property value contains at least one common English word known to the contextionary
  3. Extend the contextionary via the REST API with your industry-specific terms, then re-import the object

Example fix

// before
{"vectorizer": {"text2vec-contextionary": {"vectorizeClassName": false, "vectorizePropertyName": false}}}
// after
{"vectorizer": {"text2vec-contextionary": {"vectorizeClassName": true, "vectorizePropertyName": true}}}
Defensive patterns

Strategy: type-guard

Validate before calling

// before creating the object, ensure at least one vectorized field has plausible words
func hasUsableText(props map[string]interface{}, vectorizedProps []string) bool {
	for _, p := range vectorizedProps {
		if s, ok := props[p].(string); ok {
			for _, w := range strings.Fields(s) {
				if len([]rune(w)) >= 3 { return true }
			}
		}
	}
	return false
}

Type guard

func isInvalidObjectNoWords(err error) bool {
	var target error
	return strings.Contains(err.Error(), "could not extract") &&
		strings.Contains(err.Error(), "Original error") ||
		errors.As(err, &target)
}

Try / catch

obj, err := batch.ObjectsBatchCreate().WithObject(o).Do(ctx)
if err != nil {
	if strings.Contains(err.Error(), "could not extract any contextionary-valid words") {
		// fix schema settings or enrich the object text
	}
}

Prevention

When it happens

Trigger: A Weaviate object import (batch or REST/GraphQL create) into a class using the text2vec-contextionary module where: vectorizeClassName=false, vectorizePropertyName=false, and every property value consists solely of words unknown to the contextionary.

Common situations: Users importing objects with only IDs/numbers/foreign-language or domain jargon text while disabling name vectorization; misconfigured schema where all textual content was expected to be vectorized but no valid words exist.

Related errors


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