Search code examples
firebasegoogle-cloud-platformgoogle-cloud-firestoregoogle-cloud-functionsfirebase-admin

Is it possible to run sum() aggregation in Firebase Admin SDK


In this Cloud Firestore documentation, it seems like the sum() aggregation is only for the client side. Is there any way I can run the sum() aggregation inside cloud functions using the Admin SDK?


Solution

  • Updated

    The sum() aggregation is now available in the latest Admin SDK version (12.0.0).

    Original

    As @Frank van Puffelen mentioned, the sum() Node.js sample in the Firebase guide is not for Firebase Admin Node.js SDK but for the Google Cloud Node.js SDK. The sum() aggregation is not available yet in the current Admin SDK version(11.11.0).