{"record":{"id":"c74efc11b05ed780","repo":"weaviate/weaviate","slug":"field-path-w","errorCode":null,"errorMessage":"field 'path': %w","messagePattern":"field 'path': %w","errorType":"validation","errorClass":null,"httpStatus":422,"severity":"error","filePath":"adapters/handlers/rest/filterext/parse.go","lineNumber":179,"sourceCode":"\t\treturn -1, fmt.Errorf(\"unrecognized operator: %s\", in)\n\t}\n}\n\nfunc parsePath(in []string, rootClass string, namespacesEnabled bool, principal *models.Principal) (*filters.Path, error) {\n\tif len(in) == 0 {\n\t\treturn nil, fmt.Errorf(\"field 'path': must have at least one element\")\n\t}\n\n\t// Qualify each inner class segment (odd indices) against its parent's\n\t// namespace: rootClass for path[1], the qualified path[1] for path[3], etc.\n\tif namespacesEnabled && len(in) > 1 {\n\t\tqualified := make([]string, len(in))\n\t\tcopy(qualified, in)\n\t\tparent := rootClass\n\t\tfor i := 1; i < len(qualified); i += 2 {\n\t\t\tq, _, err := namespacing.QualifyRefTarget(principal, namespacesEnabled, parent, qualified[i])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"field 'path': %w\", err)\n\t\t\t}\n\t\t\tqualified[i] = q\n\t\t\tparent = q\n\t\t}\n\t\tin = qualified\n\t}\n\n\tpathElements := make([]interface{}, len(in))\n\tfor i, elem := range in {\n\t\tpathElements[i] = elem\n\t}\n\n\treturn filters.ParsePath(pathElements, rootClass)\n}\n\nfunc allValuesNil(in *models.WhereFilter) bool {\n\treturn in.ValueBoolean == nil &&\n\t\tin.ValueDate == nil &&","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/handlers/rest/filterext/parse.go#L161-L197","documentation":"Wrapper for a failure from namespacing.QualifyRefTarget while qualifying an inner class segment of a cross-reference filter path on a namespaces-enabled (multi-tenant) cluster. Qualification resolves each odd-indexed path element (a referenced class name) against its parent's namespace for the requesting principal; failure means the class name cannot be resolved in that namespace context.","triggerScenarios":"A multi-tenant where filter with a reference path like [\"hasRef\", \"OtherClass\", \"name\"] where OtherClass is not a valid/known target of hasRef in the principal's namespace, or the tenant/class combination fails qualification.","commonSituations":"Multi-tenant deployments where clients use bare class names in reference paths instead of the tenant-qualified form; renamed or deleted referenced collections; permission/namespace mismatches for the authenticated principal.","solutions":["Read the wrapped QualifyRefTarget error for the exact resolution failure","Use the correct referenced class name that exists as a target of the reference property","On multi-tenant clusters use the tenant-qualified class name in path segments","Verify the principal's permissions/namespace cover the referenced class"],"exampleFix":"// before\n{\"path\": [\"inArticle\", \"Article\", \"title\"], \"operator\": \"Equal\", \"valueString\": \"x\"}\n// after (tenant-qualified referenced class)\n{\"path\": [\"inArticle\", \"Article|tenant-1\", \"title\"], \"operator\": \"Equal\", \"valueString\": \"x\"}","handlingStrategy":"validation","validationCode":"// On multi-tenant clusters, verify the referenced class resolves before querying\nfunc validateRefPath(path []string, tenantClasses map[string]bool) error {\n    for i := 1; i < len(path); i += 2 {\n        if !tenantClasses[path[i]] {\n            return fmt.Errorf(\"referenced class %q not in tenant namespace\", path[i])\n        }\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"_, err := client.GraphQL().Get().WithWhereFilter(f).Do(ctx)\nif err != nil && strings.Contains(err.Error(), \"field 'path'\") {\n    return fmt.Errorf(\"reference path class not resolvable in tenant namespace: %w\", err)\n}","preventionTips":["On multi-tenant clusters use tenant-qualified class names in reference path segments","Keep referenced collections and their tenants in sync with query construction","Catch qualification failures early by resolving schema names client-side before querying"],"tags":["weaviate","multi-tenancy","where-filter","namespacing"],"backgroundTag":"filter-path-qualification-failed","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"}