I have this map field in a Firestore document:
That exists at this location:
users/jeff/tasks/my_task_id
According to the docs, to calculate the size of the document I need:
- The document name size = 6 + 5 + 6 + 11 + 16 = 44
- The sum of the string size of each field name = 4
- The sum of the size of each field value = 3 + 3 + 3 + 3 = 12
- 32 additional bytes = 32
So the total should be: 92, right?
However, according to the same docs, it is said that in case of maps:
The size of the map, calculated the same way as document size.
Does this means, that besides the sum of the size of each field value, which is 12, should add again 44 and 32, since the map field is a Map, and it should be calculated exactly like the entire document? Or should I only add 32?
It’s quite confusing, please help.
>Solution :
Does this means, that besides the sum of the size of each field value, which is 12, should add again 44 and 32, since the map field is a Map, and it should be calculated exactly like the entire document? So it should be 168?
Yes, both the sizes of the field names and values contribute to the size of the map.
