Sitemap
Mobterest Studio

Mobterest Studio

Launch and Learn with Mobterest Studio

Firestore Just Got Superpowers: Understanding Pipeline Operations

6 min readFeb 25, 2026

--

Remember the last time you tried to do something seemingly simple in your database, only to realize you’d need to write a bunch of workaround code because the database just couldn’t do it? Maybe you wanted to count how many times a specific tag appeared across all your documents, or find the most popular categories in your app, or do some basic math on nested data.

Press enter or click to view image in full size
Firestore Pipeline Operations

With traditional Firestore, you’d hit a wall pretty quickly. You’d end up maintaining extra collections just to track aggregated data, or worse, downloading thousands of documents to your app and doing the calculations there. It worked, but it felt like using a hammer when you really needed a power drill.

That just changed 👇🏽

What Firebase Just Announced

Firebase and Google Cloud just unveiled Firestore Pipeline Operations: a completely reimagined query engine that gives you over a hundred new ways to ask questions of your data. This isn’t a minor update.

This is Firestore growing up from “really good for simple queries” to “can handle complex data operations that used to require a separate analytics database.”

The key phrase to understand is “pipeline operations.” Think of it like an assembly line for your data. You start with your documents, then pass them through different stages; filtering, transforming, aggregating, until you get exactly what you need. Each stage does one thing, and you chain them together to build powerful queries.

A Real Example That Makes It Click

Let’s say you’re building a recipe app. Users can tag recipes with things like “easy,” “high protein,” “low carb.” Each recipe document has an array of these tags:

{
title: "Grilled Chicken Salad",
instructions: "Grill the chicken, toss the salad...",
tags: ["easy", "high protein", "low carb"]
}

Now you want to show users a “trending tags” feature (the top 10 most popular tags across all recipes). With old Firestore, you couldn’t do this directly. You’d need to maintain a separate “tags” collection and update counts manually every time someone added or removed a tag from a recipe. It was maintenance overhead that felt unnecessary.

With Pipeline Operations, you can just ask for it:

const snapshot = await db.pipeline()
.collection("recipes")
.unnest(field("tags").as("tagName"))
.aggregate({
accumulators: [countAll().as("tagCount")],
groups: ["tagName"]
})
.sort(field("tagCount").descending())
.limit(10)
.execute()

Let me walk you through what’s happening here, step by step:

  1. Start with the recipes collection. You’re looking at all your recipe documents
  2. Unnest the tags. This “explodes” each recipe into separate rows for each tag. If a recipe has 3 tags, it becomes 3 rows
  3. Aggregate and count. Group all those rows by tag name and count how many times each tag appears
  4. Sort by popularity. Put the most common tags first
  5. Limit to top 10. Only return the ten most popular

That’s it.

  • No extra collections to maintain.
  • No client-side processing.
  • No batch jobs running in the background to keep counts updated.

You just ask the question, and Firestore answers it.

Why This Matters for Mobile Developers

As a mobile developer, you’ve probably felt the tension between what your database can do and what your app needs to show users. You design a beautiful UI, but then realize the backend query to power it requires downloading way more data than necessary, or running calculations on the client that should really happen on the server.

Pipeline Operations shifts that balance. Now you can:

  • Aggregate data without maintaining separate collections. Count things, sum values, find averages, all within a query.
  • Transform data before it reaches your app. Reshape documents, extract nested fields, convert data types.
  • Use regular expressions in queries. Search text fields with pattern matching instead of exact matches.
  • Chain operations together . Combine filtering, sorting, grouping, and transforming in a single query.

The practical impact? Your apps can do more sophisticated data operations without bloating client-side code or over-fetching data.

You’re querying smarter, not harder.

The Two Flavors: Standard vs. Enterprise Edition

Here’s where it gets a bit nuanced. Firestore now exists in two editions.

Get Mobterest Studio’s stories in your inbox

Join Medium for free to get updates from this writer.

Standard Edition is what you already know. It automatically creates indexes for you, makes queries fast by requiring those indexes, and has the simple query API you’re familiar with. It’s not going away. If your app works fine today, you can keep using it forever.

Enterprise Edition is the new hotness with Pipeline Operations. But it works differently:

  • No automatic indexes. You decide what to index based on your actual query patterns
  • Queries work without indexes. They’ll just be slow on large collections until you add indexes
  • Different pricing model. Writes and deletes are both just “write operations” and you get a generous free tier.
  • Over 100 new query capabilities. All the Pipeline Operations goodness

Despite the name “Enterprise,” it’s not just for big companies. Firebase gives you a free tier for Enterprise edition just like Standard. The name is more about capability than audience.

Should You Switch Right Now?

Probably not immediately. Here’s my honest take.

If you’re starting a brand new project, Enterprise Edition is worth considering from day one. You get more flexible querying, often better free tier coverage (especially if you do a lot of writes), and you won’t have to migrate later if you need Pipeline Operations.

If you have an existing app on Standard Edition, switching requires actual work. You need to:

  • Export your data and import it into a new Enterprise database
  • Recreate your indexes manually
  • Set up security rules again
  • Update your SDK initialization code
  • Test everything thoroughly

That’s not trivial. So unless you’re hitting real limitations with Standard Edition queries, there’s no rush. Standard Edition isn’t deprecated. Your existing queries will keep working exactly as they do today.

The sweet spot for migration is when you’re planning a major feature that would benefit from complex querying, or when you’re already doing a database architecture overhaul. Otherwise, bookmark this for later.

The Practical Stuff: How to Actually Use It

If you decide to try Enterprise Edition, the process is straightforward:

  1. Create a new Enterprise database in your Firebase console (you can have multiple databases in one project)
  2. Update your Firestore SDK to the latest version
  3. Point your app to the new database by specifying its name when you initialize:
const db = new Firestore({
projectId: "your-project-id",
databaseId: "your-enterprise-database"
});

4. Convert existing queries to pipelines if you want, or just write new pipeline-based queries:

// Old way
const query = db.collection("recipes").where("authorId", "==", user.id);
// Convert to pipeline
const pipeline = db.pipeline().createFrom(query);
// Now extend it with new capabilities
const results = await pipeline
.where(field("rating").greaterThan(4))
.execute();

The SDKs support Android, iOS, Web, and the Admin SDK right now. Flutter, Unity, and C++ support is coming soon.

What This Really Means Long-Term

For years, one of Firestore’s biggest criticisms was that it couldn’t handle complex queries. Developers would choose PostgreSQL or MongoDB specifically because they needed aggregations, complex joins, or flexible querying that Firestore simply couldn’t do.

Pipeline Operations closes that gap. Firestore now competes feature-wise with major NoSQL databases while keeping the things that made it special: real-time sync, offline caching, tight Firebase integration, and a developer experience that doesn’t require becoming a database expert.

This update isn’t just about adding features. It’s about Firestore growing into the kind of database you can build an entire production app on without constantly working around its limitations.

Where to Go From Here

For now, just know this: Firestore got a lot more powerful. And whether you switch today or bookmark it for later, Pipeline Operations are worth understanding because they fundamentally change what’s possible in your mobile apps.

Follow along on Mobterest Studio to learn more about Firebase, mobile architecture, and making better technical decisions in your apps.

--

Mobterest Studio
Mobterest Studio

Written by Mobterest Studio

Launch and Learn with Mobterest Studio