weaviate/weaviate · error
using ["%s"] to filter by timestamp: must use "valueText" or
Error message
using ["%s"] to filter by timestamp: must use "valueText" or "valueDate"
What it means
The internal timestamp properties (creationTimeUnix, lastUpdateTimeUnix) accept only valueDate or valueText filter values. Any other value kind (e.g. valueInt for the unix epoch) is rejected by the filter validator.
Source
Thrown at entities/filters/filters_validator.go:221
return true
default:
return false
}
}
func validateInternalPropertyClause(propName schema.PropertyName, cw *clauseWrapper) error {
switch propName {
case InternalPropBackwardsCompatID, InternalPropID:
if cw.isType(schema.DataTypeText) {
return nil
}
return errors.Errorf(
`using ["_id"] to filter by uuid: must use "valueText" to specify the id`)
case InternalPropCreationTimeUnix, InternalPropLastUpdateTimeUnix:
if cw.isType(schema.DataTypeDate) || cw.isType(schema.DataTypeText) {
return nil
}
return errors.Errorf(
`using ["%s"] to filter by timestamp: must use "valueText" or "valueDate"`, propName)
default:
return errors.Errorf("unsupported internal property: %s", propName)
}
}
func isUUIDType(dtString string) bool {
dt := schema.DataType(dtString)
return dt == schema.DataTypeUUID || dt == schema.DataTypeUUIDArray
}
func validateUUIDType(propName schema.PropertyName, cw *clauseWrapper) error {
if cw.isType(schema.DataTypeText) {
return validateUUIDOperators(propName, cw)
}
return fmt.Errorf("property %q is of type \"uuid\" or \"uuid[]\": "+
"specify uuid as string using \"valueText\"", propName)View on GitHub (pinned to 75aa4b6d11)
Solutions
- Switch the filter to valueDate with an ISO 8601 date string (or valueText).
- Do not use valueInt for internal timestamp filters.
- Wrap internal-meta filter construction in a helper that emits valueDate.
Example fix
// before
{ path: ["_creationTimeUnix"], valueInt: 1699999999, operator: GreaterThan }
// after
{ path: ["_creationTimeUnix"], valueDate: "2023-11-14T00:00:00Z", operator: GreaterThan } Defensive patterns
Strategy: validation
Validate before calling
function checkTimestampFilter(f) {
const p = f.path?.[0];
if (p === '_creationTimeUnix' || p === '_lastUpdateTimeUnix') {
if (f.valueDate === undefined && f.valueText === undefined) {
throw new Error(`${p} filters require valueDate or valueText, not numeric kinds`);
}
}
} Type guard
const isInternalTimestampPath = (path) => ['_creationTimeUnix','_lastUpdateTimeUnix'].includes(path?.[0]);
Prevention
- Use valueDate (ISO 8601) for internal timestamp filters, never valueInt
- Build meta-field filters through a dedicated helper
- Read the field name as a label, not as a hint about the wire type
When it happens
Trigger: Filtering with path ["_creationTimeUnix"] or ["_lastUpdateTimeUnix"] using valueInt/valueNumber with a numeric epoch instead of valueDate (ISO 8601 / unix per API) or valueText.
Common situations: Developers assume timestamps are integers because the name says 'Unix' and send valueInt; auto-generated clients mapping meta fields to numbers.
Related errors
- could not extract filters: %w
- Filtering for property length supports operators (not) equal
- Can only filter for positive property length got %v instead
- using ["_id"] to filter by uuid: must use "valueText" to spe
- unsupported internal property: %s
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/f70928df7703a84a.
Report an issue: GitHub.