weaviate/weaviate · error
`indexInverted` is deprecated and can not be set together wi
Error message
`indexInverted` is deprecated and can not be set together with `indexFilterable`, `indexSearchable` or `indexRangeFilters`
What it means
`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.
Source
Thrown at usecases/schema/class.go:1290
return fmt.Errorf("tokenization is not allowed for data type '%s'", primitiveDataType)
}
return fmt.Errorf("tokenization '%s' is not allowed for data type '%s'", tokenization, primitiveDataType)
}
if tokenization == "" {
return nil
}
if propertyDataType.IsNested() {
return fmt.Errorf("tokenization is not allowed for object/object[] data types")
}
return fmt.Errorf("tokenization is not allowed for reference data type")
}
func (h *Handler) validatePropertyIndexing(prop *models.Property) error {
if prop.IndexInverted != nil {
if prop.IndexFilterable != nil || prop.IndexSearchable != nil || prop.IndexRangeFilters != nil {
return fmt.Errorf("`indexInverted` is deprecated and can not be set together with `indexFilterable`, " + "`indexSearchable` or `indexRangeFilters`")
}
}
dataType, _ := schema.AsPrimitive(prop.DataType)
if prop.IndexSearchable != nil {
switch dataType {
case schema.DataTypeString, schema.DataTypeStringArray:
// string/string[] are migrated to text/text[] later,
// at this point they are still valid data types, therefore should be handled here.
// true or false allowed
case schema.DataTypeText, schema.DataTypeTextArray:
// true or false allowed
default:
if *prop.IndexSearchable {
return fmt.Errorf("`indexSearchable` is allowed only for text/text[] data types. " +
"For other data types set false or leave empty")
}
}View on GitHub (pinned to 75aa4b6d11)
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).
Example fix
// before
{"name":"title","dataType":["text"],"indexInverted":true,"indexSearchable":true}
// after
{"name":"title","dataType":["text"],"indexSearchable":true} Defensive patterns
Strategy: validation
Validate before calling
function validateIndexFlags(prop) {
const hasDeprecated = prop.indexInverted !== undefined;
const hasModern = ['indexFilterable','indexSearchable','indexRangeFilters'].some(k => prop[k] !== undefined);
if (hasDeprecated && hasModern) {
throw new Error(`property '${prop.name}': drop indexInverted when using indexFilterable/indexSearchable/indexRangeFilters`);
}
} Type guard
function usesLegacyIndexFlag(prop) {
return prop.indexInverted !== undefined;
} Prevention
- 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.
When it happens
Trigger: Create-class or add/update-property request where a property has BOTH `indexInverted` (any value) AND at least one of `indexFilterable`, `indexSearchable`, `indexRangeFilters`.
Common situations: 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.
Related errors
- replica movement in progress
- configured properties don't exist or are not of text or blob
- get data type of property: %w
- drop-vector enqueue: finalize collection %q on recorded cove
- failed to create stopword detector: %w
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/a420d8fdfe817929.
Report an issue: GitHub.