Is snowflake generated ID can be bigger then unsigned_long? (2^64-1)

It’s a bit stupid question, but I don’t have enough relevant expirience to answer it myself.

Can a snowflake generated ID (274950720577339394), be bigger then unsigned_long type of integer? (2^64-1)

Just a bit more info. I’d like to store snowflake IDs inside the elasticsearch index, and according to it’s integer types there is a unsigned_long which I guess should perfectly fit, and store snowflake as a number. So doesn’t it a good idea? Or it’s safe to use keyword instead of int types?

>Solution :

No, they can’t.

According to this post on Google Groups,

IDs will still be 64-bit unsigned integers

Note that this post was posted in 2010, which is a while ago, but it doesn’t seem it was changed.

Leave a Reply