{"record":{"id":"e5eaeff77e9263e5","repo":"weaviate/weaviate","slug":"property-q-n-indexing-is-only-supported-on-nes","errorCode":null,"errorMessage":"property %q: [N] indexing is only supported on nested object[] properties","messagePattern":"property %q: \\[N\\] indexing is only supported on nested object\\[\\] properties","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"entities/filters/filters_validator.go","lineNumber":103,"sourceCode":"\n\t// Strip any [N] index from the first path segment so that \"nested[0].city\"\n\t// correctly resolves to the \"nested\" property in the schema.\n\trootName := nested.RootPropName(propName.String())\n\tprop, err := schema.GetPropertyByName(class, rootName)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// [N] indexing is only meaningful for nested object[] properties. If the\n\t// user wrote it on a flat property the positional intent would otherwise\n\t// be silently dropped (e.g. \"tagsArray[0]\" would degrade to \"tagsArray\"),\n\t// so reject it at validation time. Inspect the first path segment\n\t// directly so this branch only triggers when the user actually wrote [N];\n\t// any other malformed dotted input falls through to a more appropriate\n\t// error path below.\n\tif nested.ParseSegments(propName.String())[0].HasIndex {\n\t\tif _, ok := schema.AsNested(prop.DataType); !ok {\n\t\t\treturn fmt.Errorf(\"property %q: [N] indexing is only supported on nested object[] properties\",\n\t\t\t\tpropName)\n\t\t}\n\t}\n\n\tif _, ok := schema.AsNested(prop.DataType); ok {\n\t\t// Preview gate — fires before any other nested validation so the user\n\t\t// sees a single actionable message instead of a downstream\n\t\t// \"sub-property not found\" / contradiction error. See\n\t\t// entities/config/feature_flags.go.\n\t\tif !entcfg.NestedFilteringEnabled() {\n\t\t\treturn entcfg.NestedFilteringDisabledError()\n\t\t}\n\t\treturn validateNestedProp(prop, propName, isPropLengthFilter, cw)\n\t}\n\n\tif cw.getOperator() == OperatorIsNull {\n\t\tif !cw.isType(schema.DataTypeBoolean) {\n\t\t\treturn errors.Errorf(\"operator IsNull requires a booleanValue, got %v instead\",","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/entities/filters/filters_validator.go#L85-L121","documentation":"Validation guard in validateClause: a filter path used [N] positional indexing (e.g. 'tagsArray[0]') on a property that is not a nested object[] property; the positional intent would be silently dropped, so it is rejected.","triggerScenarios":"Thrown at entities/filters/filters_validator.go:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the [N] index from the flat property path — positional filtering only applies to object[] properties","If positional intent matters, model the data as a nested object[] and use nested[0].field paths"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}