diff --git a/quesma/clickhouse/type_adapter.go b/quesma/clickhouse/type_adapter.go index d186310d4..db139735f 100644 --- a/quesma/clickhouse/type_adapter.go +++ b/quesma/clickhouse/type_adapter.go @@ -26,8 +26,8 @@ func (c SchemaTypeAdapter) Convert(s string) (schema.Type, bool) { return schema.TypeKeyword, true case "Int", "Int8", "Int16", "Int32", "Int64": return schema.TypeLong, true - case "Uint8", "Uint16", "Uint32", "Uint64", "Uint128", "Uint256": - return schema.TypeUnsignedLong, true + case "UInt8", "UInt16", "UInt32", "UInt64", "UInt128", "UInt256": + return schema.TypeInteger, true case "Bool": return schema.TypeBoolean, true case "Float32", "Float64": diff --git a/quesma/quesma/functionality/field_capabilities/field_caps.go b/quesma/quesma/functionality/field_capabilities/field_caps.go index 07438d48b..90cedc1a2 100644 --- a/quesma/quesma/functionality/field_capabilities/field_caps.go +++ b/quesma/quesma/functionality/field_capabilities/field_caps.go @@ -142,6 +142,8 @@ func asElasticType(t schema.Type) string { return elasticsearch_field_types.FieldTypeObject case schema.TypePoint.Name: return elasticsearch_field_types.FieldTypeGeoPoint + case schema.TypeInteger.Name: + return elasticsearch_field_types.FieldTypeInteger default: return elasticsearch_field_types.FieldTypeText } diff --git a/quesma/schema/types.go b/quesma/schema/types.go index 25d22bc3a..f90ea1ab4 100644 --- a/quesma/schema/types.go +++ b/quesma/schema/types.go @@ -8,6 +8,7 @@ var ( // TODO add more and review existing TypeText = Type{Name: "text", Properties: []TypeProperty{Searchable, FullText}} TypeKeyword = Type{Name: "keyword", Properties: []TypeProperty{Searchable, Aggregatable}} + TypeInteger = Type{Name: "integer", Properties: []TypeProperty{Searchable, Aggregatable}} TypeLong = Type{Name: "long", Properties: []TypeProperty{Searchable, Aggregatable}} TypeUnsignedLong = Type{Name: "unsigned_long", Properties: []TypeProperty{Searchable, Aggregatable}} TypeTimestamp = Type{Name: "timestamp", Properties: []TypeProperty{Searchable, Aggregatable}}