weaviate/weaviate · error
`indexRangeFilters` is allowed only for number/int/date data
Error message
`indexRangeFilters` is allowed only for number/int/date data types. For other data types set false or leave empty
What it means
`indexRangeFilters` enables range-comparison (>, <=, between) filter structures, which Weaviate currently builds only for numeric and date types (number, int, date). Setting the flag to true on any other (or array variant not yet supported) dataType is rejected by validatePropertyIndexing. Note the source: even number[]/int[]/date[] fall through to default, so arrays are rejected too ('not supported (yet?)').
Source
Thrown at usecases/schema/class.go:1319
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")
}
}
}
if prop.IndexRangeFilters != nil {
switch dataType {
case schema.DataTypeNumber, schema.DataTypeInt, schema.DataTypeDate:
// true or false allowed
case schema.DataTypeNumberArray, schema.DataTypeIntArray, schema.DataTypeDateArray:
// not supported (yet?)
fallthrough
default:
if *prop.IndexRangeFilters {
return fmt.Errorf("`indexRangeFilters` is allowed only for number/int/date data types. " +
"For other data types set false or leave empty")
}
}
}
return nil
}
func validatePropertyProcessing(prop *models.Property, propertyDataType schema.PropertyDataType, userPresets map[string][]string) error {
// Treat an empty config as absent — some client generators emit
// "textAnalyzer": {} by default and this should not block creation.
if prop.TextAnalyzer != nil && !prop.TextAnalyzer.ASCIIFold && len(prop.TextAnalyzer.ASCIIFoldIgnore) == 0 && prop.TextAnalyzer.StopwordPreset == "" {
prop.TextAnalyzer = nil
}
if prop.TextAnalyzer == nil {
return nil
}
View on GitHub (pinned to 75aa4b6d11)
Solutions
- Only set `indexRangeFilters: true` on scalar `number`, `int`, or `date` properties; remove it elsewhere.
- For array numerics, either drop range filtering or restructure into individual scalar properties.
- Use `indexFilterable` for equality filtering on non-range types.
Example fix
// before
{"name":"scores","dataType":["int[]"],"indexRangeFilters":true}
// after
{"name":"scores","dataType":["int[]"],"indexFilterable":true} Defensive patterns
Strategy: validation
Validate before calling
function validateRangeFilters(prop) {
const allowed = ['number','int','date']; // array variants not supported
if (prop.indexRangeFilters === true && !allowed.includes(prop.dataType[0])) {
throw new Error(`property '${prop.name}': indexRangeFilters only for scalar number/int/date`);
}
} Type guard
function supportsRangeFilters(prop) {
return ['number','int','date'].includes(prop.dataType[0]);
} Prevention
- Remember range filters are scalar-only: number/int/date, NOT their [] variants.
- Gate the flag behind a helper that knows the supported type list.
When it happens
Trigger: Create/update property with dataType text, boolean, phoneNumber, or number[]/int[]/date[] and `indexRangeFilters: true`.
Common situations: Assuming array numerics support range filters like scalars; enabling the flag on every property for consistency; expecting range filters on strings/dates-as-strings.
Related errors
- property %q set as "deleteOn" should have filterable or rang
- `indexSearchable` is allowed only for text/text[] data types
- property '%s': processing options are only allowed for prope
- unknown datatype for aggregation type reference: ${dataType}
- IndexPropertyLength cannot be changed when updating a schema
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/10742c370bdac6a5.
Report an issue: GitHub.