File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,15 @@ We use the following structure to store feature data in the Firestore:
7474
7575Document id for the feature document is computed by hashing entity key using murmurhash3_128 algorithm as follows:
7676
77- 1 . hash utf8-encoded entity names, sorted in alphanumeric order
78- 2 . hash the entity values in the same order as corresponding entity names, by serializing them to bytes as follows:
79- - binary values are hashed as-is
80- - string values hashed after serializing them as utf8 string
77+ 1 . hash entity names, sorted in alphanumeric order, by serializing them to bytes using the Value Serialization steps below
78+ 2 . hash the entity values in the same order as corresponding entity names, by serializing them to bytes using the Value Serialization steps below
79+
80+ Value Serialization:
81+ * Store the type of the value (ValueType enum) as little-endian uint32.
82+ * Store the byte length of the serialized value as little-endian uint32
83+ * Store the serialized value as bytes:
84+ - binary values are serialized as is
85+ - string values serialized as utf8 string
8186 - int64 and int32 hashed as little-endian byte representation (8 and 4 bytes respectively)
8287 - bool hashed as 0 or 1 byte
8388
You can’t perform that action at this time.
0 commit comments