Enable full text search on Firstore data in Firebase using Meilisearch integration

You can easily enable full text search on Firestore data in Firebase by using Meilisearch integration. Meilisearch is an open-source search engine that can be integrated with Firebase using a simple Cloud Function. Once integrated, you can perform full text searches on your Firestore data using the Meilisearch UI.

Here's a quick guide on how to get started:

Step 1: Setup Meilisearch

Create a Meilisearch account and setup your first index. You can use the default settings for the index.

Step 2: Install the Meilisearch Firebase Integration

Install the Meilisearch Firebase Integration using the Cloud Functions CLI. This will deploy a Cloud Function that will listen for changes on your Firestore data and update the Meilisearch index accordingly.

Step 3: Configure the Integration

Configure the Meilisearch Firebase Integration by setting the following environment variables:


- MEILISEARCH_HOST: The hostname of your Meilisearch instance (e.g. https://my-meilisearch-instance.com)

- MEILISEARCH_INDEX_UID: The UID of the index you want to use

- FIRESTORE_COLLECTION: The name of the Firestore collection you want to index

- FIRESTORE_DOCUMENT_ID_FIELD: The name of the field in your Firestore documents that contains the document ID

- FIRESTORE_FIELDS_TO_INDEX: A comma-separated list of fields from your Firestore documents that you want to index

- FIRESTORE_FIELD_WEIGHT: A comma-separated list of field weights (optional)
For more information on how to configure the integration, please refer to the documentation.

Step 4: That's it!

You can now perform full text searches on your Firestore data using the Meilisearch UI.

Meilisearch
Enable full text search on Firstore data in Firebase using Meilisearch integration
Meilisearch

Looking for help with this? Join the discussion

Discord

Give Rowy a star on Github ⭐️🙏