{"record":{"id":"fccdaf88209b091a","repo":"weaviate/weaviate","slug":"nested-property-q-is-not-filterable","errorCode":null,"errorMessage":"nested property %q is not filterable","messagePattern":"nested property %q is not filterable","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/repos/db/inverted/searcher_nested.go","lineNumber":50,"sourceCode":"\tcleanRelPath, cleanRelSegs, arrayIndices := filnested.ParseIndexedPath(path)\n\n\tif filter.Operator == filters.OperatorIsNull {\n\t\treturn s.buildNestedIsNullPair(filter, prop.Name, cleanRelPath, arrayIndices, class)\n\t}\n\n\tleaf, err := filnested.FindLeaf(cleanRelSegs, prop.NestedProperties)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"nested path %q: %w\", path, err)\n\t}\n\n\t// TODO aliszka:nested_filtering when rangeable / searchable nested\n\t// filtering support is added, add corresponding schema.IsNestedRangeable\n\t// and schema.IsNestedSearchable checks alongside the filterable check\n\t// below. The validator currently rejects non-filterable leaves at parse\n\t// time; the check below stays as a defensive safeguard for any code path\n\t// that bypasses validation.\n\tif !schema.IsNestedFilterable(leaf) {\n\t\treturn nil, fmt.Errorf(\"nested property %q is not filterable\", path)\n\t}\n\n\treturn s.buildNestedFilterPair(filter, prop.Name, path, cleanRelPath, arrayIndices, leaf, class)\n}\n\n// buildNestedFilterPair encodes the filter value for the given leaf type and\n// returns the corresponding propValuePair(s).\nfunc (s *Searcher) buildNestedFilterPair(filter *filters.Clause, propName, fullPath, relPath string,\n\tarrayIndices arrayIndices, leaf *models.NestedProperty, class *models.Class,\n) (*propValuePair, error) {\n\tdt := schema.DataType(leaf.DataType[0])\n\tswitch dt {\n\tcase schema.DataTypeText, schema.DataTypeTextArray:\n\t\treturn s.buildNestedTextFilterPair(filter, propName, fullPath, relPath, leaf, arrayIndices, class)\n\tdefault:\n\t\treturn s.buildNestedPrimitiveFilterPair(filter, propName, fullPath, relPath, dt, arrayIndices, class)\n\t}\n}","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/repos/db/inverted/searcher_nested.go#L32-L68","documentation":"Weaviate only allows filters on nested leaves marked filterable (index_filterable/index_searchable settings). extractNestedProp checks schema.IsNestedFilterable after resolving the leaf and rejects the filter if the leaf property is not filterable. The parse-time validator normally rejects these earlier; this is a defensive check for code paths that bypass validation.","triggerScenarios":"Filtering on a nested leaf whose NestedProperty was configured with index_filterable=false (or is otherwise not filterable), via a code path that skipped the request-time validator (e.g. internal/programmatic filter construction).","commonSituations":"A schema migration set index_filterable:false on a nested field for storage savings while old clients still filter on it; internal tooling building filter clauses directly.","solutions":["Set index_filterable: true on that nested leaf in the class schema and reindex if required","Remove or change the filter so it targets a filterable nested leaf","Check the validator settings to understand why the leaf was marked non-filterable"],"exampleFix":"// before\n{\"name\":\"city\",\"dataType\":[\"text\"],\"indexFilterable\":false}\n// after\n{\"name\":\"city\",\"dataType\":[\"text\"],\"indexFilterable\":true}","handlingStrategy":"validation","validationCode":"// before filtering, check the leaf is filterable\nconst leaf = findNestedLeaf(cls, path);\nif (leaf && leaf.indexFilterable === false) {\n  throw new Error(`Nested leaf '${path}' is not filterable (indexFilterable=false)`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep indexFilterable:true on every nested field clients may filter on","Review schema migrations for indexFilterable flips and update dependent queries","Document which nested fields are filterable for API consumers"],"tags":["weaviate","filtering","nested-properties","schema-config"],"backgroundTag":"property-not-filterable","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"}