Whenever you execute a query (or read an entire collection) in Firestore through the Python SDK, you can specify a so-called projection
, which is documented as:
projection
: (Optional[google.cloud.proto.firestore.v1. query.StructuredQuery.Projection])
A projection of document fields to limit the query results to.
I couldn't quickly find a code-sample, but this is the field to specify in your code.
Note for others landing here: the ability to request only specific fields is only available in the server-side/Admin SDKs for Firestore. There is no equivalent in the client-side SDKs.