{"record":{"id":"0579ddd3efe85e04","repo":"weaviate/weaviate","slug":"autoschema-defaultdate-must-be-either-date-or-s","errorCode":null,"errorMessage":"autoSchema.defaultDate must be either 'date' or 'string' or 'text","messagePattern":"autoSchema\\.defaultDate must be either 'date' or 'string' or 'text","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/config/config_handler.go","lineNumber":839,"sourceCode":"type AutoSchema struct {\n\tEnabled       *runtime.DynamicValue[bool] `json:\"enabled\" yaml:\"enabled\"`\n\tDefaultString string                      `json:\"defaultString\" yaml:\"defaultString\"`\n\tDefaultNumber string                      `json:\"defaultNumber\" yaml:\"defaultNumber\"`\n\tDefaultDate   string                      `json:\"defaultDate\" yaml:\"defaultDate\"`\n}\n\nfunc (a AutoSchema) Validate() error {\n\tif a.DefaultNumber != \"int\" && a.DefaultNumber != \"number\" {\n\t\treturn fmt.Errorf(\"autoSchema.defaultNumber must be either 'int' or 'number\")\n\t}\n\tif a.DefaultString != schema.DataTypeText.String() &&\n\t\ta.DefaultString != schema.DataTypeString.String() {\n\t\treturn fmt.Errorf(\"autoSchema.defaultString must be either 'string' or 'text\")\n\t}\n\tif a.DefaultDate != \"date\" &&\n\t\ta.DefaultDate != schema.DataTypeText.String() &&\n\t\ta.DefaultDate != schema.DataTypeString.String() {\n\t\treturn fmt.Errorf(\"autoSchema.defaultDate must be either 'date' or 'string' or 'text\")\n\t}\n\n\treturn nil\n}\n\n// QueryDefaults for optional parameters\ntype QueryDefaults struct {\n\tLimit        int64 `json:\"limit\" yaml:\"limit\"`\n\tLimitGraphQL int64 `json:\"limitGraphQL\" yaml:\"limitGraphQL\"`\n}\n\n// DefaultBackupMinChunkSize is the default minimum size for backup chunks\nconst DefaultBackupMinChunkSize = 1024 * 1024 // 1MB\n\n// DefaultBackupChunkTargetSize is the default target size for packing small files into chunks\nconst DefaultBackupChunkTargetSize = 10 * 1024 * 1024 // 10MB\n\n// DefaultBackupSplitFileSize is the default size for splitting large files during backup","sourceCodeStart":821,"sourceCodeEnd":857,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/config/config_handler.go#L821-L857","documentation":"AutoSchema.Validate requires autoSchema.defaultDate to be \"date\", \"string\", or \"text\"; it decides how date-looking values are typed when auto-schema ingests objects. Any other value aborts startup with this message (which omits a closing quote after 'text).","triggerScenarios":"Setting autoSchema.defaultDate to an unsupported value such as \"datetime\", \"timestamp\", \"iso8601\", or an empty string, then starting the server or running config validation.","commonSituations":"Using ISO/timestamp vocabulary from other databases; wanting dates stored as text but writing \"date-string\" or similar; hand-merged YAML files introducing invalid values.","solutions":["Set autoSchema.defaultDate to \"date\" to keep native date typing (recommended).","Use \"string\" or \"text\" if dates should be ingested as plain text properties.","Remove the key to fall back to the code default."],"exampleFix":"// before (yaml)\nautoSchema:\n  defaultDate: timestamp\n// after\nautoSchema:\n  defaultDate: date","handlingStrategy":"validation","validationCode":"v := cfg.AutoSchema.DefaultDate\nif v != \"date\" && v != \"string\" && v != \"text\" {\n  return fmt.Errorf(\"autoSchema.defaultDate must be 'date', 'string' or 'text', got %q\", v)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use \"date\" unless dates must land as text properties","Avoid timestamp/datetime/iso8601 vocabulary from other systems","Keep the autoSchema block minimal and validated against docs"],"tags":["configuration","validation","autoschema"],"backgroundTag":"invalid-config-value","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"}