Search by Algolia
How personalization boosts customer engagement
e-commerce

How personalization boosts customer engagement

You land on your favorite retailer’s website, where everything seems to be attractively arranged just for you. Your favorite ...

Jon Silvers

Director, Digital Marketing

What is retail analytics and how can it inform your data-driven ecommerce merchandising strategy?
e-commerce

What is retail analytics and how can it inform your data-driven ecommerce merchandising strategy?

There is such tremendous activity both on and off of retailer websites today that it would be impossible to make ...

Catherine Dee

Search and Discovery writer

8 ways to use merchandising data to boost your online store ROI
e-commerce

8 ways to use merchandising data to boost your online store ROI

New year, new goals. Sounds positive, but looking at your sales data, your revenue and profit aren’t so hot ...

John Stewart

VP, Corporate Communications and Brand

Algolia DocSearch + Astro Starlight
engineering

Algolia DocSearch + Astro Starlight

What is Astro Starlight? If you're building a documentation site, your content needs to be easy to write and ...

Jaden Baptista

Technical Writer

What role does AI play in recommendation systems and engines?
ai

What role does AI play in recommendation systems and engines?

You put that in your cart. How about this cool thing to go with it? You liked that? Here are ...

Catherine Dee

Search and Discovery writer

How AI can help improve your user experience
ux

How AI can help improve your user experience

They say you get one chance to make a great first impression. With visual design on ecommerce web pages, this ...

Jon Silvers

Director, Digital Marketing

Keeping your Algolia search index up to date
product

Keeping your Algolia search index up to date

When creating your initial Algolia index, you may seed the index with an initial set of data. This is convenient ...

Jaden Baptista

Technical Writer

Merchandising in the AI era
e-commerce

Merchandising in the AI era

For merchandisers, every website visit is an opportunity to promote products to potential buyers. In the era of AI, incorporating ...

Tariq Khan

Director of Content Marketing

Debunking the most common AI myths
ai

Debunking the most common AI myths

ARTIFICIAL INTELLIGENCE CAN’T BE TRUSTED, shouts the headline on your social media newsfeed. Is that really true, or is ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

How AI can benefit the retail industry
ai

How AI can benefit the retail industry

Artificial intelligence is on a roll. It’s strengthening healthcare diagnostics, taking on office grunt work, helping banks combat fraud ...

Catherine Dee

Search and Discovery writer

How ecommerce AI is reshaping business
e-commerce

How ecommerce AI is reshaping business

Like other modern phenomena such as social media, artificial intelligence has landed on the ecommerce industry scene with a giant ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

AI-driven smart merchandising: what it is and why your ecommerce store needs it
ai

AI-driven smart merchandising: what it is and why your ecommerce store needs it

Do you dream of having your own personal online shopper? Someone familiar and fun who pops up every time you ...

Catherine Dee

Search and Discovery writer

NRF 2024: A cocktail of inspiration and innovation
e-commerce

NRF 2024: A cocktail of inspiration and innovation

Retail’s big show, NRF 2024, once again brought together a wide spectrum of practitioners focused on innovation and transformation ...

Reshma Iyer

Director of Product Marketing, Ecommerce

How AI-powered personalization is transforming the user and customer experience
ai

How AI-powered personalization is transforming the user and customer experience

In a world of so many overwhelming choices for consumers, how can you best engage with the shoppers who visit ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

Unveiling the future: Algolia’s AI revolution at NRF Retail Big Show
algolia

Unveiling the future: Algolia’s AI revolution at NRF Retail Big Show

Get ready for an exhilarating journey into the future of retail as Algolia takes center stage at the NRF Retail ...

John Stewart

VP Corporate Marketing

How to master personalization with AI
ai

How to master personalization with AI

Picture ecommerce in its early days: businesses were just beginning to discover the power of personalized marketing. They’d divide ...

Ciprian Borodescu

AI Product Manager | On a mission to help people succeed through the use of AI

5 best practices for nailing the ecommerce virtual assistant user experience
ai

5 best practices for nailing the ecommerce virtual assistant user experience

“Hello there, how can I help you today?”, asks the virtual shopping assistant in the lower right-hand corner ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

Add InstantSearch and Autocomplete to your search experience in just 5 minutes
product

Add InstantSearch and Autocomplete to your search experience in just 5 minutes

A good starting point for building a comprehensive search experience is a straightforward app template. When crafting your application’s ...

Imogen Lovera

Senior Product Manager

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

Magento 2: Our New Extension is Here, and It’s Full of New Features
product

Jan Petr

Software Engineer

An Exploration of Search and Indexing: Fast Indexing Scenarios
product

Peter Villani

Sr. Tech & Business Writer