Firestore with MongoDB compatibility is now generally available

In April, we released a public preview of Firestore with MongoDB compatibility available through Google Cloud. Now, we’re excited to share that Firestore with MongoDB compatibility is available in Firebase and we’re graduating to general availability! If you missed this earlier announcement, you might be wondering: What is MongoDB compatibility? And should I use it if I’m starting a new project? Let’s take a look.

Firestore Enterprise edition

Firestore with MongoDB compatibility is available on a new Firestore Enterprise edition, which features MongoDB API compatibility along with more than 200 new powerful query capabilities, additional data types, new index types and improved performance.

At a glance, this means you can use existing MongoDB application code, drivers, and open-source libraries & tools with Firestore. Furthermore, Firestore no longer needs to stick to queries that are exclusively mapped to indexes, and can instead run more general workloads that, for example, allow you to match a text field using a regular expression without ever creating an index.

In other words, you can think of it as Firestore with more flexibility, advanced query capabilities, better performance and additional control for the developer. Firestore with MongoDB compatibility features many highly requested capabilities like aggregations, nested array & set manipulations, regular expression matching on text strings, and the ability to perform lookups (JOIN) on data.

If you’re an experienced Firestore developer, you might suspect that these changes come with a new pricing model, and you’re right. You can check out the new pricing on our pricing page.

Getting started

You can create a new Firestore with MongoDB compatibility database using the Firestore Enterprise edition directly in the Firebase Console.

To edit queries, the Firebase console now features an advanced query editor, allowing you to author and execute MongoDB Query Language (MQL) queries and view results that include new BSON data types.

Firebase Console's new advanced query editor
Firebase Console's new advanced query editor

Want more control around indexing? You can now create unique, sparse and non-sparse indexes all from the Firebase Console. Since Firestore Enterprise edition doesn’t require indexes on every query, this gives you fine-grained control over which of your queries use or don’t use indexes, which lets you optimize both your costs and your database’s performance.

Firebase Console's new index creation UI
Firebase Console's new index creation UI

Of course, you can create and manage databases and indexes via the Firebase CLI as well.

$firebase firestore:databases:create --edition enterprise
Copied!

Enterprise vs Standard edition

If you love the Firebase SDKs with realtime sync and offline capabilities, you can keep using Firestore Standard edition! Standard edition Firestore databases are not going away, so your existing Firestore projects will continue to run indefinitely without any pricing or behavior changes.

SDKs

In an upcoming release, all of the goodness of Firestore Enterprise edition will also be accessible via the Firebase SDKs with realtime sync and offline. Stay tuned!

Firestore is ready for your MongoDB workloads

If you want to upgrade from Firestore Standard edition to Enterprise edition, you’ll have to wait for the upcoming SDK compatibility release. If you’re a MongoDB developer, Firestore Enterprise is ready for your database workloads today. Check out the documentation for how to get started.

We’re delighted to see all the interest in Firestore over the past years and we’re elated to share that we’re finally able to deliver the query features our developers have been requesting. Now that Firestore with MongoDB compatibility is out, please give it a try!