{"record":{"id":"6e26652ae08eb702","repo":"weaviate/weaviate","slug":"unsupported-type-t-6e2665","errorCode":null,"errorMessage":"unsupported type %T","messagePattern":"unsupported type %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/repos/db/inverted/objects.go","lineNumber":559,"sourceCode":"func typedSliceToUntyped(in any) ([]any, error) {\n\tswitch typed := in.(type) {\n\tcase []any:\n\t\t// nothing to do\n\t\treturn typed, nil\n\tcase []string:\n\t\treturn convertToUntyped[string](typed), nil\n\tcase []int:\n\t\treturn convertToUntyped[int](typed), nil\n\tcase []time.Time:\n\t\treturn convertToUntyped[time.Time](typed), nil\n\tcase []bool:\n\t\treturn convertToUntyped[bool](typed), nil\n\tcase []float64:\n\t\treturn convertToUntyped[float64](typed), nil\n\tcase []uuid.UUID:\n\t\treturn convertToUntyped[uuid.UUID](typed), nil\n\tdefault:\n\t\treturn nil, errors.Errorf(\"unsupported type %T\", in)\n\t}\n}\n\nfunc convertToUntyped[T comparable](in []T) []any {\n\tout := make([]any, len(in))\n\tfor i := range out {\n\t\tout[i] = in[i]\n\t}\n\treturn out\n}\n\n// Indicates whether property should be indexed\n// Index holds document ids with property of/containing particular value\n// and number of its occurrences in that property\n// (index created using bucket of StrategyMapCollection)\nfunc HasSearchableIndex(prop *models.Property) bool {\n\tswitch dt, _ := schema.AsPrimitive(prop.DataType); dt {\n\tcase schema.DataTypeText, schema.DataTypeTextArray:","sourceCodeStart":541,"sourceCodeEnd":577,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/repos/db/inverted/objects.go#L541-L577","documentation":"typedSliceToUntyped converts typed Go slices from an object property into []any for inverted-index processing. It only supports concrete slice types (string, int, bool, float64, uuid, etc.); a property whose value is a slice of another type reaches the default case and errors. This means an object contained a property array value of a type the inverted indexer does not recognize.","triggerScenarios":"Inserting/updating an object (extendPropertiesWithArrayType path) whose array property contains element types outside the supported set — e.g. []int8/[]int32, []float32, nested slices, or a custom type passed through module/extension code.","commonSituations":"Schema misconfiguration where a property datatype maps to an unsupported Go slice; custom code or a module supplying int32 arrays; importing data serialized from another system with narrower numeric types.","solutions":["Normalize the property value to a supported slice type ([]string, []int, []bool, []float64, []uuid.UUID) before writing the object","Fix the schema so the property uses a supported datatype for its contents","Identify the offending object type via the %T text in the error and convert the ingestion code accordingly","If it comes from a module/integration, update that module to emit supported types"],"exampleFix":"// before\ncounts := []int32{1, 2, 3}\nprops[\"counts\"] = counts\n// after\ncounts := []int32{1, 2, 3}\nout := make([]int, len(counts))\nfor i, v := range counts { out[i] = int(v) }\nprops[\"counts\"] = out","handlingStrategy":"validation","validationCode":"func isSupportedSlice(v any) bool {\n    switch v.(type) {\n    case []string, []int, []bool, []float64, []uuid.UUID, nil:\n        return true\n    default:\n        return false\n    }\n}\n// call before writing the object property","typeGuard":"func normalizeSlice(in any) any {\n    switch t := in.(type) {\n    case []int32:\n        out := make([]int, len(t))\n        for i, v := range t { out[i] = int(v) }\n        return out\n    default:\n        return in\n    }\n}","tryCatchPattern":"err := extendPropertiesWithArrayType(...)\nif err != nil && strings.Contains(err.Error(), \"unsupported type\") {\n    // inspect %T in message, convert the value, retry the batch item\n}","preventionTips":["Declare property datatypes in the schema before ingest","Coerce numeric arrays to []int / []float64 at the ingestion boundary","Add a pre-insert validation pass over object values in custom importers"],"tags":["types","schema","inverted-index"],"backgroundTag":"unsupported-property-type","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"}