{"record":{"id":"bb9e65860415e760","repo":"weaviate/weaviate","slug":"vectorizing-object-with-corpus-v-w","errorCode":null,"errorMessage":"vectorizing object with corpus '%+v': %w","messagePattern":"vectorizing object with corpus '%\\+v': %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/text2vec-contextionary/vectorizer/vectorizer.go","lineNumber":134,"sourceCode":"\t\t\t\t\"options:\\n\\n1.) Make sure that the schema class name or the set properties are \"+\n\t\t\t\t\"a contextionary-valid term and include them in vectorization using the \"+\n\t\t\t\t\"'vectorizeClassName' or 'vectorizePropertyName' setting. In this case the vector position \"+\n\t\t\t\t\"will be composed of both the class/property names and the values for those fields. \"+\n\t\t\t\t\"Even if no property values are contextionary-valid, the overall word corpus is still valid \"+\n\t\t\t\t\"due to the contextionary-valid class/property names.\"+\n\t\t\t\t\"\\n\\n2.) Alternatively, if you do not want to include schema class/property names \"+\n\t\t\t\t\"in vectorization, you must make sure that at least one text/string property contains \"+\n\t\t\t\t\"at least one contextionary-valid word.\"+\n\t\t\t\t\"\\n\\n3.) If the word corpus weaviate extracted from your object \"+\n\t\t\t\t\"(see below) does contain enough meaning to build a vector position, but the contextionary \"+\n\t\t\t\t\"did not recognize the words, you can extend the contextionary using the \"+\n\t\t\t\t\"REST API. This is the case\twhen you use mostly industry-specific terms which are \"+\n\t\t\t\t\"not known to the common language contextionary. Once extended, simply reimport this object.\"+\n\t\t\t\t\"\\n\\nThe following words were extracted from your object: %v\"+\n\t\t\t\t\"\\n\\nTo learn more about the contextionary and how it behaves, check out: https://www.semi.technology/documentation/weaviate/current/contextionary.html\"+\n\t\t\t\t\"\\n\\nOriginal error: %v\", corpi, err)\n\t\tdefault:\n\t\t\treturn nil, nil, fmt.Errorf(\"vectorizing object with corpus '%+v': %w\", corpi, err)\n\t\t}\n\t}\n\n\treturn vector, ie, nil\n}\n\n// Corpi takes any list of strings and builds a common vector for all of them\nfunc (v *Vectorizer) Corpi(ctx context.Context, corpi []string,\n) ([]float32, error) {\n\t// can be written to concurrently if multiple named vectors are used\n\tcorpiTmp := make([]string, len(corpi))\n\tfor i, corpus := range corpi {\n\t\tcorpiTmp[i] = camelCaseToLower(corpus)\n\t}\n\n\tvector, _, err := v.client.VectorForCorpi(ctx, corpiTmp, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"vectorizing corpus '%+v': %w\", corpiTmp, err)","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/text2vec-contextionary/vectorizer/vectorizer.go#L116-L152","documentation":"Generic fallback in Object(): when VectorForCorpi fails with any error other than ErrNoUsableWords (network failure, non-200 from the contextionary inference container, invalid API key to the module, malformed response), the error is wrapped as 'vectorizing object with corpus ...: %w'. The original error is preserved for errors.As/Is inspection.","triggerScenarios":"Object import where the remote contextionary/inference service is unreachable, returns a non-200 status, times out, or otherwise errors — anything that isn't an ErrNoUsableWords.","commonSituations":"text2vec-contextionary/transformer inference container down or restarting, wrong INFERENCE_URL in docker-compose, network partition between Weaviate and the module, OOM-killed inference container.","solutions":["Check that the contextionary inference container is running (docker compose ps) and reachable at the configured INFERENCE_URL","Inspect the wrapped cause in the error chain for the actual transport/HTTP failure","Retry the import once the inference service is healthy"],"exampleFix":"// debug the wrapped cause\nvar target error\nif errors.As(err, &target) { log.Printf(\"root cause: %v\", target) }","handlingStrategy":"retry","validationCode":"// health-check the inference service before import\nresp, err := http.Get(inferenceURL + \"/meta\")\nif err != nil || resp.StatusCode != 200 {\n\treturn fmt.Errorf(\"contextionary inference unavailable\")\n}","typeGuard":"func isInferenceUnavailable(err error) bool {\n\treturn err != nil && strings.Contains(err.Error(), \"vectorizing object with corpus\")\n}","tryCatchPattern":"obj, err := client.Data().Creator().WithObject(o).Do(ctx)\nif err != nil {\n\tif strings.Contains(err.Error(), \"vectorizing object with corpus\") {\n\t\t// retry with backoff; the inference service may be transiently down\n\t}\n}","preventionTips":["Monitor the text2vec-contextionary inference container health","Set correct INFERENCE_URL in the Weaviate environment","Add retry with backoff around batch imports","Watch memory limits on the inference container to avoid OOM kills"],"tags":["go","vectorizer","network","inference-service"],"backgroundTag":"inference-service-unreachable","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"}