Go 1.11 has reached end of support and will be deprecated on January 31, 2026. After deprecation, you won't be able to deploy Go 1.11 applications, even if your organization previously used an organization policy to re-enable deployments of legacy runtimes. Your existing Go 1.11 applications will continue to run and receive traffic after their deprecation date. We recommend that you migrate to the latest supported version of Go.

Entity Property Reference

Firestore in Datastore mode (Datastore) supports a variety of data types for property values. These include, among others:

  • Integers
  • Floating-point numbers
  • Strings
  • Dates
  • Binary data

For a full list of types, see Properties and value types.

Properties and value types

The data values associated with an entity consist of one or more properties. Each property has a name and one or more values. A property can have values of more than one type, and two entities can have values of different types for the same property. Properties can be indexed or unindexed (queries that order or filter on a property P will ignore entities where P is unindexed). An entity can have at most 20,000 indexed properties.

The following value types are supported:

Value type Go type(s) Sort order Notes
Integer int
int8
int16
int32
int64
Numeric 64-bit integer, signed
Floating-point number float32
float64
Numeric 64-bit double precision,
IEEE 754
Boolean bool false<true
String (short) string Unicode
Up to 1500 bytes
String (long) string (with noindex) None Up to 1 megabyte

Not indexed
Byte slice (short) datastore.ByteString Byte order Up to 1500 bytes
Byte slice (long) []byte None Up to 1 megabyte

Not indexed
Date and time time.Time Chronological
Geographical point appengine.GeoPoint By latitude,
then longitude
Datastore key *datastore.Key By path elements
(kind, identifier,
kind, identifier...)
Blobstore key appengine.BlobKey Byte order

You can also use a struct or slice to aggregate properties. See the Datastore reference for more details.

When a query involves a property with values of mixed types, Datastore uses a deterministic ordering based on the internal representations:

  1. Null values
  2. Fixed-point numbers
    • Integers
    • Dates and times
  3. Boolean values
  4. Byte sequences
    • Byte slices (short)
    • Unicode string
    • Blobstore keys
  5. Floating-point numbers
  6. Geographical points
  7. Datastore keys

Because long byte slices and long strings are not indexed, they have no ordering defined.

Except 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. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年01月02日 UTC.