

This value doesn't need to stay consistent from one execution of an application to another execution of the same application.
ANDROID CALCULATE IMAGE BUCKET ID CODE
Priority fields (both ascending), the total size of the index entry in thisĮxcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. The size of an index entry in a composite index with collection group scope isįor a composite index with collection group scope that indexes the done and Priority fields (both ascending), the total size of the entry in this index is The size of an index entry in a composite index with collection scope is theįor a composite index with collection scope that indexes the done and The size of an entry in a composite index depends on whether the index is scoped The size of an entry in a single-field index with collection group scope is theįor a single-field index with collection group scope that indexes the doneįield, the total size of the entry in this index is 98 bytes: 27 bytes for the parent document's document name users/jeff.44 bytes for the document name users/jeff/tasks/my_task_id.The string size of the indexed field nameĬonsider a document in the sub-collection users/jeff/tasks withįor a single-field index with collection scope that indexes the doneįield, the total size of the entry in this index is 109 bytes:.The document name size of the indexed document's parent.The document name size of the indexed document.The size of an entry in a single-field index with collection scope is the sum The size of a single-field index entry depends on whether an index is scoped toĪ collection or a collection group. Index entry sizes are calculated as follows for single-field and composite So the document size is 44 + 71 + 32 = 147 bytes: The total size of the fields is 71 bytes: Field name and valueġ4 5 for the field name + 9 for the field's string valueĦ 5 for the field name + 1 for the field's boolean valueġ7 9 for the field name + 8 for the field's integer valueģ4 12 for the field name + 22 for the field's string value This example is for a document in subcollection users/jeff/tasks The sum of the size of each field value.The sum of the string size of each field name.Note: Field values in an index are truncated after 1500 bytes, see The size of the map, calculated the same way as document sizeįor example, a boolean field named done would use 6 bytes: The following table shows the size of field values by type.

11 bytes for the my_task_id document ID.Of my_task_id, the document name size is 6 + 5 + 6 + 11 + 16 = 44 bytes: The size of each collection ID and document ID in the path to the documentįor a document in the subcollection users/jeff/tasks with a string document ID.The size of a document name is the sum of: Note: The Cloud Firestore client libraries always use string document The size of a document ID is either the string size for a string The field name description uses 11 bytes + 1 byte, for a total of 12.

The collection ID tasks uses 5 bytes + 1 byte, for a total of 6 bytes.String sizes are calculated as the number of UTF-8 encoded bytes + 1. You can learn about the costs of this storage at Cloud Firestore This page describes the storage size of documents, document names, fields, and
