Meilisearch Cloud is the easiest way to get a Meilisearch instance for use with Firebase.
Prerequisites
- A Firebase project on the Blaze (pay-as-you-go) plan
- Cloud Firestore set up in your Firebase project
- A running Meilisearch instance (Cloud or self-hosted)
- A Meilisearch API key with write permissions
Install the extension
You can install the extension using the Firebase Console or the Firebase CLI.- Firebase Console
- Firebase CLI
Visit the Firebase Extensions Hub and click Install.Follow the prompts to select your Firebase project and configure the extension.
Configuration
During installation, you’ll configure the following parameters:| Parameter | Description |
|---|---|
| Cloud Functions location | Region where the extension’s functions will be deployed |
| Collection path | The Firestore collection to sync (e.g., products, articles) |
| Fields to index | Comma-separated list of field names, or leave blank to index all fields |
| Meilisearch index name | The name of the Meilisearch index to sync data to |
| Meilisearch host | Your Meilisearch instance URL (must start with http:// or https://) |
| Meilisearch API key | An API key with permission to manage indexes |
How it works
Once installed, the extension deploys a Cloud Function calledindexingWorker that:
- Listens for document creates, updates, and deletions in your specified collection
- Syncs changes to your Meilisearch index in real-time
- Maps Firestore document IDs to a
_firestore_idfield in Meilisearch
Data format
Document IDs
Firestore document IDs are automatically mapped to a_firestore_id field in Meilisearch. Any field named _firestore_id in your source documents will be ignored.
Geolocation
For geo search functionality, name your GeoPoint field_geo in Firestore. Meilisearch will automatically recognize it for geo search queries.
Import existing documents
The extension only syncs documents created or modified after installation. To import existing documents, use the provided import script:Search your data
Once your data is synced, you can search it using any Meilisearch SDK or the REST API:- JavaScript
- cURL