#community-help

Data Types for utc_datetime, uuid, and Null Fields

TLDR arpit asked about data types for utc_datetime, uuid, and null fields. Jason suggested using int64, string, and optional with a boolean field in case of null values.

Powered by Struct AI
ty

2

1

1

10
9mo
Solved
Join the chat
Mar 15, 2023 (9 months ago)
arpit
Photo of md5-1efb73197193b4fe6e4cd54bdee10db0
arpit
09:48 PM
what should be the data-type/field-type for utc_datetime field ?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
09:50 PM
It should be int64
arpit
Photo of md5-1efb73197193b4fe6e4cd54bdee10db0
arpit
10:05 PM
Gotcha. And uuid fileds should be string ?
10:06
arpit
10:06 PM
Thanks Jason

1

Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:06 PM
That’s right
ty

1

arpit
Photo of md5-1efb73197193b4fe6e4cd54bdee10db0
arpit
10:53 PM
What should be the type of null ?
10:53
arpit
10:53 PM
or we must need to convert them string or some number based on the type ?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:53 PM
If a field can have a null value, you want to set it to optional: true

1

ty

1

10:54
Jason
10:54 PM
If you want to filter by null values, then I’d recommend adding a new booelan field called say is_field_x_null: true | false
arpit
Photo of md5-1efb73197193b4fe6e4cd54bdee10db0
arpit
10:54 PM
Got it

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3011 threads (79% resolved)

Join Our Community