Search by Algolia
Feature Spotlight: Query Rules
product

Feature Spotlight: Query Rules

You’re running an ecommerce site for an electronics retailer, and you’re seeing in your analytics that users keep ...

Jaden Baptista

Technical Writer

An introduction to transformer models in neural networks and machine learning
ai

An introduction to transformer models in neural networks and machine learning

What do OpenAI and DeepMind have in common? Give up? These innovative organizations both utilize technology known as transformer models ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What’s the secret of online merchandise management? Giving store merchandisers the right tools
e-commerce

What’s the secret of online merchandise management? Giving store merchandisers the right tools

As a successful in-store boutique manager in 1994, you might have had your merchandisers adorn your street-facing storefront ...

Catherine Dee

Search and Discovery writer

New features and capabilities in Algolia InstantSearch
engineering

New features and capabilities in Algolia InstantSearch

At Algolia, our business is more than search and discovery, it’s the continuous improvement of site search. If you ...

Haroen Viaene

JavaScript Library Developer

Feature Spotlight: Analytics
product

Feature Spotlight: Analytics

Analytics brings math and data into the otherwise very subjective world of ecommerce. It helps companies quantify how well their ...

Jaden Baptista

Technical Writer

What is clustering?
ai

What is clustering?

Amid all the momentous developments in the generative AI data space, are you a data scientist struggling to make sense ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What is a vector database?
product

What is a vector database?

Fashion ideas for guest aunt informal summer wedding Funny movie to get my bored high-schoolers off their addictive gaming ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Unlock the power of image-based recommendation with Algolia’s LookingSimilar
engineering

Unlock the power of image-based recommendation with Algolia’s LookingSimilar

Imagine you're visiting an online art gallery and a specific painting catches your eye. You'd like to find ...

Raed Chammam

Senior Software Engineer

Empowering Change: Algolia's Global Giving Days Impact Report
algolia

Empowering Change: Algolia's Global Giving Days Impact Report

At Algolia, our commitment to making a positive impact extends far beyond the digital landscape. We believe in the power ...

Amy Ciba

Senior Manager, People Success

Retail personalization: Give your ecommerce customers the tailored shopping experiences they expect and deserve
e-commerce

Retail personalization: Give your ecommerce customers the tailored shopping experiences they expect and deserve

In today’s post-pandemic-yet-still-super-competitive retail landscape, gaining, keeping, and converting ecommerce customers is no easy ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Algolia x eTail | A busy few days in Boston
algolia

Algolia x eTail | A busy few days in Boston

There are few atmospheres as unique as that of a conference exhibit hall: the air always filled with an indescribable ...

Marissa Wharton

Marketing Content Manager

What are vectors and how do they apply to machine learning?
ai

What are vectors and how do they apply to machine learning?

To consider the question of what vectors are, it helps to be a mathematician, or at least someone who’s ...

Catherine Dee

Search and Discovery writer

Why imports are important in JS
engineering

Why imports are important in JS

My first foray into programming was writing Python on a Raspberry Pi to flicker some LED lights — it wasn’t ...

Jaden Baptista

Technical Writer

What is ecommerce? The complete guide
e-commerce

What is ecommerce? The complete guide

How well do you know the world of modern ecommerce?  With retail ecommerce sales having exceeded $5.7 trillion worldwide ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Data is king: The role of data capture and integrity in embracing AI
ai

Data is king: The role of data capture and integrity in embracing AI

In a world of artificial intelligence (AI), data serves as the foundation for machine learning (ML) models to identify trends ...

Alexandra Anghel

Director of AI Engineering

What are data privacy and data security? Why are they  critical for an organization?
product

What are data privacy and data security? Why are they critical for an organization?

Imagine you’re a leading healthcare provider that performs extensive data collection as part of your patient management. You’re ...

Catherine Dee

Search and Discovery writer

Achieving digital excellence: Algolia's insights from the GDS Retail Digital Summit
e-commerce

Achieving digital excellence: Algolia's insights from the GDS Retail Digital Summit

In an era where customer experience reigns supreme, achieving digital excellence is a worthy goal for retail leaders. But what ...

Marissa Wharton

Marketing Content Manager

AI at scale: Managing ML models over time & across use cases
ai

AI at scale: Managing ML models over time & across use cases

Just a few years ago it would have required considerable resources to build a new AI service from scratch. Of ...

Benoit Perrot

VP, Engineering

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

We know why you are here. You want to learn how to integrate Google Firebase Firestore database with Algolia search. 

Firebase Firestore is a NoSQL cloud database that provides structure to manage your data into multiple collections. It is scalable, serverless and it provides synchronization between client and server and offline mode. Most importantly, it is highly secure and it comes at a reasonable cost.

However, Firebase does not support search functionality out of the box. To solve this, you needed to turn to a third party application — and the one recommended by Firebase is in fact Algolia

We have a search product that enables full-text search that is fast, relevant, API-first, and has a solid free plan that makes it easy to start and grow your product. We also provide a wide choice of client libraries and SDKs for all major languages/platforms and are very proud of our documentation. 

Up until today, however, integrating Algolia and Firebase involved a non-trivial number of steps. Today, we are excited to announce the Firestore<>Algolia extension.  

The technical stack 

Let me provide a high level integration diagram on what we are trying to achieve with these two products in your stack.

So how do we implement the above architecture with the new Firebase Extension Framework? 

The old-school way

There are many articles and blog posts that describe the implementation. The gist of it was to use Cloud Function to implement the logic to monitor the Firestore database and push changes to Algolia indexes. This required writing code in Google Cloud Functions to wire and monitor changes to the Firestore database, as well as maintaining and supporting the integration.

The new kid on the block

At Fireconf 2019, Firebase announced the Firebase Extensions Framework. The idea is to provide users with configuration-only extensions maintained and supported by extension providers. We are proud to have become a part of this framework in 2021, as announced at Google I/O. The Algolia extension can be installed with a click of a button or using a CLI, which will kick off a process to provision the Cloud Function to monitor the Firestore database for changes based on the configuration information provided by the developer. Let’s see this in action.

Prerequisites

1. Navigate to the Firebase Extension listing page.

For details on the extension, click on “See Details”.

 

2. Click “Install in console” to start the installation process. The first step in the process is to create or select an existing Firebase project.

3. You will be prompted to enter the following configurations:

  1. Collection Path, the path to the collection in your Firestore database
  2. Fields, the document fields to be send to Algolia for indexing
  3. Algolia Applications ID
  4. Algolia Index Name
  5. Algolia Api Key
  6. Location, GCP region to deploy the Cloud Function

NOTE: This extension can be installed multiple times monitoring different collections and pushing the changes to a central Algolia Search Index or a separate Index for each collection.

That’s it!  Now go ahead and click install and configure to your heart’s desire, and don’t forget to send us feedback: twitter.com/algolia. Happy configuring!

P.S. Future improvements

There are known limitations on the extension, which will be addressed in future releases.  

  1. Algolia relevance works well with records smaller than 10kb or the limit set based on your plan.  Any record larger than this limit will be rejected by Algolia Indexing Process.  In future versions of the extension, we are hoping to implement a record splitting logic to break large records into smaller records for indexing.  Refer to Sending and Managing data for more information on large documents.
  2. Restructuring the Firestore document before sending to Algolia to improve relevance.
About the author
Sajid Momin

Senior Director, Integrations @ Algolia

linkedin

Start building for free

Create a full-featured search experience in no time.

Get started
Start building for free

Recommended Articles

Powered byAlgolia Algolia Recommend

Geo-Spatial Search on Mobile: Quick but Not Dirty
engineering

Robert Mogos

An Exploration of Search and Indexing: Fast Indexing Scenarios
product

Peter Villani

Sr. Tech & Business Writer

API Documentation 2.0: From Browsing to Search
product

Peter Villani

Sr. Tech & Business Writer