{"record":{"id":"a420d8fdfe817929","repo":"weaviate/weaviate","slug":"indexinverted-is-deprecated-and-can-not-be-set-t","errorCode":null,"errorMessage":"`indexInverted` is deprecated and can not be set together with `indexFilterable`, `indexSearchable` or `indexRangeFilters`","messagePattern":"`indexInverted` is deprecated and can not be set together with `indexFilterable`, `indexSearchable` or `indexRangeFilters`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/schema/class.go","lineNumber":1290,"sourceCode":"\t\t\treturn fmt.Errorf(\"tokenization is not allowed for data type '%s'\", primitiveDataType)\n\t\t}\n\t\treturn fmt.Errorf(\"tokenization '%s' is not allowed for data type '%s'\", tokenization, primitiveDataType)\n\t}\n\n\tif tokenization == \"\" {\n\t\treturn nil\n\t}\n\n\tif propertyDataType.IsNested() {\n\t\treturn fmt.Errorf(\"tokenization is not allowed for object/object[] data types\")\n\t}\n\treturn fmt.Errorf(\"tokenization is not allowed for reference data type\")\n}\n\nfunc (h *Handler) validatePropertyIndexing(prop *models.Property) error {\n\tif prop.IndexInverted != nil {\n\t\tif prop.IndexFilterable != nil || prop.IndexSearchable != nil || prop.IndexRangeFilters != nil {\n\t\t\treturn fmt.Errorf(\"`indexInverted` is deprecated and can not be set together with `indexFilterable`, \" + \"`indexSearchable` or `indexRangeFilters`\")\n\t\t}\n\t}\n\n\tdataType, _ := schema.AsPrimitive(prop.DataType)\n\tif prop.IndexSearchable != nil {\n\t\tswitch dataType {\n\t\tcase schema.DataTypeString, schema.DataTypeStringArray:\n\t\t\t// string/string[] are migrated to text/text[] later,\n\t\t\t// at this point they are still valid data types, therefore should be handled here.\n\t\t\t// true or false allowed\n\t\tcase schema.DataTypeText, schema.DataTypeTextArray:\n\t\t\t// true or false allowed\n\t\tdefault:\n\t\t\tif *prop.IndexSearchable {\n\t\t\t\treturn fmt.Errorf(\"`indexSearchable` is allowed only for text/text[] data types. \" +\n\t\t\t\t\t\"For other data types set false or leave empty\")\n\t\t\t}\n\t\t}","sourceCodeStart":1272,"sourceCodeEnd":1308,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/schema/class.go#L1272-L1308","documentation":"`indexInverted` was the original boolean controlling the inverted index. It was deprecated in favor of the finer-grained `indexFilterable`, `indexSearchable`, and `indexRangeFilters` flags, which control distinct index structures. Because the semantics would be ambiguous, validatePropertyIndexing rejects any property that sets the deprecated flag together with any of the new flags.","triggerScenarios":"Create-class or add/update-property request where a property has BOTH `indexInverted` (any value) AND at least one of `indexFilterable`, `indexSearchable`, `indexRangeFilters`.","commonSituations":"Upgrading schemas written against pre-1.19 Weaviate to a newer version and adding new-style flags without removing the old one; documentation snippets from different eras merged together; ORM/config generators that emit all known fields.","solutions":["Remove the deprecated `indexInverted` field and keep only the new flags (`indexFilterable`, `indexSearchable`, `indexRangeFilters`).","Map old to new: indexInverted controlled searchability — replace `indexInverted:false` with `indexSearchable:false` (text) and/or `indexFilterable:false` as appropriate.","If you intentionally still want only the legacy flag, drop the new flags instead (not recommended long-term)."],"exampleFix":"// before\n{\"name\":\"title\",\"dataType\":[\"text\"],\"indexInverted\":true,\"indexSearchable\":true}\n// after\n{\"name\":\"title\",\"dataType\":[\"text\"],\"indexSearchable\":true}","handlingStrategy":"validation","validationCode":"function validateIndexFlags(prop) {\n  const hasDeprecated = prop.indexInverted !== undefined;\n  const hasModern = ['indexFilterable','indexSearchable','indexRangeFilters'].some(k => prop[k] !== undefined);\n  if (hasDeprecated && hasModern) {\n    throw new Error(`property '${prop.name}': drop indexInverted when using indexFilterable/indexSearchable/indexRangeFilters`);\n  }\n}","typeGuard":"function usesLegacyIndexFlag(prop) {\n  return prop.indexInverted !== undefined;\n}","tryCatchPattern":null,"preventionTips":["Migrate fully to indexFilterable/indexSearchable/indexRangeFilters and ban indexInverted in your schema lint.","Treat indexInverted as removed when importing schemas from pre-1.19 setups.","Disable unknown/deprecated fields in generated clients."],"tags":["schema","deprecation","indexing","weaviate"],"backgroundTag":"deprecated-index-inverted-conflict","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"}