Firebase Admin icon

Firebase Admin

Interact with Firebase Firestore, Auth, and Storage using Firebase Admin SDK

Firestore → Pipeline Query

AI-generated

Summary

Execute an advanced Firestore aggregation pipeline query, allowing complex document retrieval from collections, collection groups, or specific document paths with multiple configurable stages.

Inputs

  • Project Name or ID — Select the Firebase project by name or ID, or provide an expression.
  • Database Name or ID — Select the Firestore database, defaulting if unspecified.
  • Source Type (required) — Choose the source of documents to query: a collection, a collection group, or specific document paths.
  • Path / Name / Document Paths (required) — Depending on Source Type, specify the collection path, collection group name, or JSON array of document paths to query.
  • Pipeline Stages (required) — Define one or more stages to transform and filter the documents in sequence, including filtering (where), selecting or removing fields, sorting, limiting, offsetting, adding computed fields, performing distinct or aggregate operations, vector-based nearest neighbor search, replacing document content, random sampling, union with another collection, or unnesting array fields.

Output shape

a list of Firestore documents or aggregated results according to the pipeline stages configured

The output reflects documents or aggregated records after sequentially applying the configured pipeline stages; some stages (e.g., aggregate) modify output shape. Pagination occurs only as configured by limit or offset stages. Errors can occur if source references or pipeline stages are invalid.

Links

Discussion