Search by Algolia
Easily integrate Algolia into native apps with FlutterFlow
engineering

Easily integrate Algolia into native apps with FlutterFlow

Algolia's advanced search capabilities pair seamlessly with iOS or Android Apps when using FlutterFlow. App development and search design ...

Chuck Meyer

Sr. Developer Relations Engineer

Algolia's search propels 1,000s of retailers to Black Friday success
e-commerce

Algolia's search propels 1,000s of retailers to Black Friday success

In the midst of the Black Friday shopping frenzy, Algolia soared to new heights, setting new records and delivering an ...

Bernadette Nixon

Chief Executive Officer and Board Member at Algolia

Generative AI’s impact on the ecommerce industry
ai

Generative AI’s impact on the ecommerce industry

When was your last online shopping trip, and how did it go? For consumers, it’s becoming arguably tougher to ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What’s the average ecommerce conversion rate and how does yours compare?
e-commerce

What’s the average ecommerce conversion rate and how does yours compare?

Have you put your blood, sweat, and tears into perfecting your online store, only to see your conversion rates stuck ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What are AI chatbots, how do they work, and how have they impacted ecommerce?
ai

What are AI chatbots, how do they work, and how have they impacted ecommerce?

“Hello, how can I help you today?”  This has to be the most tired, but nevertheless tried-and-true ...

Catherine Dee

Search and Discovery writer

Algolia named a leader in IDC MarketScape
algolia

Algolia named a leader in IDC MarketScape

We are proud to announce that Algolia was named a leader in the IDC Marketscape in the Worldwide General-Purpose ...

John Stewart

VP Corporate Marketing

Mastering the channel shift: How leading distributors provide excellent online buying experiences
e-commerce

Mastering the channel shift: How leading distributors provide excellent online buying experiences

Twice a year, B2B Online brings together America’s leading manufacturers and distributors to uncover learnings and industry trends. This ...

Jack Moberger

Director, Sales Enablement & B2B Practice Leader

Large language models (LLMs) vs generative AI: what’s the difference?
ai

Large language models (LLMs) vs generative AI: what’s the difference?

Generative AI and large language models (LLMs). These two cutting-edge AI technologies sound like totally different, incomparable things. One ...

Catherine Dee

Search and Discovery writer

What is generative AI and how does it work?
ai

What is generative AI and how does it work?

ChatGPT, Bing, Bard, YouChat, DALL-E, Jasper…chances are good you’re leveraging some version of generative artificial intelligence on ...

Catherine Dee

Search and Discovery writer

Feature Spotlight: Query Suggestions
product

Feature Spotlight: Query Suggestions

Your users are spoiled. They’re used to Google’s refined and convenient search interface, so they have high expectations ...

Jaden Baptista

Technical Writer

What does it take to build and train a large language model? An introduction
ai

What does it take to build and train a large language model? An introduction

Imagine if, as your final exam for a computer science class, you had to create a real-world large language ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

The pros and cons of AI language models
ai

The pros and cons of AI language models

What do you think of the OpenAI ChatGPT app and AI language models? There’s lots going on: GPT-3 ...

Catherine Dee

Search and Discovery writer

How AI is transforming merchandising from reactive to proactive
e-commerce

How AI is transforming merchandising from reactive to proactive

In the fast-paced and dynamic realm of digital merchandising, being reactive to customer trends has been the norm. In ...

Lorna Rivera

Staff User Researcher

Top examples of some of the best large language models out there
ai

Top examples of some of the best large language models out there

You’re at a dinner party when the conversation takes a computer-science-y turn. Have you tried ChatGPT? What ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What are large language models?
ai

What are large language models?

It’s the era of Big Data, and super-sized language models are the latest stars. When it comes to ...

Catherine Dee

Search and Discovery writer

Mobile search done right: Common pitfalls and best practices
ux

Mobile search done right: Common pitfalls and best practices

Did you know that 86% of the global population uses a smartphone? The 7 billion devices connected to the Internet ...

Alexandre Collin

Staff SME Business & Optimization - UI/UX

Cloud Native meetup: Observability & Sustainability
engineering

Cloud Native meetup: Observability & Sustainability

The Cloud Native Foundation is known for being the organization behind Kubernetes and many other Cloud Native tools. To foster ...

Tim Carry

Algolia DocSearch is now free for all docs sites
product

Algolia DocSearch is now free for all docs sites

TL;DR Revamp your technical documentation search experience with DocSearch! Previously only available to open-source projects, we're excited ...

Shane Afsar

Senior Engineering Manager

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

We invited our friends at Starschema to write about an example of using Algolia in combination with MongoDB. We hope that you enjoy this four-part series by Full Stack Engineer Soma Osvay.

If you’d like to skip ahead, here are the other links:

Part 2 – Proposed solution and design

Part 3 – Data pipeline implementation

Part 4 – Frontend implementation and conclusion


Hey, I’m Soma and I’m part of a relatively small consultation team that maintains multiple real-estate ecommerce solutions for one of our most high-profile clients. These apps enable end users to sell, buy, or rent homes across multiple countries. They aren’t classical webshops though. In some cases, we just connect supply and demand, but in the case of renting, we actually manage transactions, orders, cancellations, and communication between the parties. We’ve been expanding the scope of these services greatly in the past few years, which allowed our client to explore new business opportunities and invest both time and resources to add new features, upgrade the infrastructure, and focus on data-driven decision making.

We recently added a lot of new services to the webshops, like:

  • Social media integration
  • Advanced SEO
  • Possibility for real-estate agent registration
  • AI-based recommendation system
  • Real-estate history
  • Neighborhood analysis

Because of these new services and organic growth, the number of listings on the websites have increased dramatically. That brought focus to the fact that our search capabilities were not meeting our clients’ demands. Search results were often irrelevant, inaccurate, and slow, fostering a bad experience for the users and a bad reputation for the company.

Providing accurate real-estate search results is a challenge because there are many relevant attributes. Customers are expecting to search by:

  • Geographical location
  • Type of neighborhood (urban, suburban, frequented, quiet, etc)
  • Type of building (newly built, old, industrial)
  • Proximity to public transportation, schools, sport facilities, etc
  • Price range
  • Energy and green rating
  • Eligibility for certain loans or other financing solutions

Customer surveys indicated that poor search results translated directly to a loss of revenue for our client. Customers were leaving the websites after only a few unsuccessful searches! Control groups showed that only those who were persistent and used simpler search terms were finding the listings they were looking for. This made it abundantly clear that providing fast, accurate and relevant search results would raise the click-through rate for the product, so it was designated as a top-priority feature in the next release cycle.

My task is to come up with a solution to improve the search capabilities of the ecommerce sites. This blog post goes through my journey in implementing a basic proof-of-concept search solution that we can build on later to create advanced search for our services.

Current webshop architecture & data pipeline

The architecture for this particular webshop is somewhat fractured. The consumer-facing and admin-facing applications are completely separate, managed by different teams and only connected on the data level.

The admin application is used by real-estate owners and agents to list their available properties for buying and renting, manage rent orders, and see stats, among other things. This application isn’t managed by my organization unit. It connects to a single database that contains the application data.

The consumer application is marketed, available publicly, listed in Google, and has advanced SEO. This is the one my team is responsible for, and the one we’ll be improving in this article series. Consumers use this app to list properties that they are interested in buying and renting, and it allows them to handle financial transactions, communicate with other users, and so on.

Architecture

Our current architecture looks like this:

Diagram of current architecture

Challenges & possible solutions

Our main challenge is that MongoDB is limited in the search department. As it stands, the cloud hosted version of MongoDB supports Atlas Search, which is a fine grained indexing solution, but it isn’t applicable to us since we are using an on-premise MongoDB instance, which only supports Legacy Text search. It can’t search across multiple fields and through significant textual content.

The legacy text search poses a couple issues for us:

  • The $text operator does not support full-text search. It can search for phrases and keywords, but that is often not enough.
  • It can’t rank results based on relevance to the query.
  • It doesn’t let us easily search through multiple fields and arrays.
  • Words with diacritics (like é or õ) should be treated as identical to the version of the word without diacritics (e and o, in this case), but that’s very slow..

Because of these problems, our app doesn’t provide a smooth search experience for our end users.

We’ve experimented with an on-premise hosted version of ElasticSearch (and using the MongoDB River Plugin for synchronization), but hosting & fine-tuning ElasticSearch proved to be difficult for our team. We ended up with a very unpredictable searching experience which was not only slow on many occasions, but also inaccurate.

To add to that, an ElasticSearch integration would require us to modify our entire application stack! Both the backend and the frontend of our application would need to be modified heavily to make it work. We would have to manage application security, write our own UX code, and write complex indexing logic in code. We also have a lot of legacy code in our application, so there is a high cost to modifying, testing, and deploying new versions, as it requires extensive domain knowledge and experience that only a few developers here have.

Seeing these problems, we gave up on ElasticSearch. The development cost in both time and resources was just too great for the benefit that it would bring.

Algolia

After doing some internal and external research, I found that other teams inside my company are using a solution called Algolia to improve their products’ search. They told me a great deal about the quality of the SDKs it provides and how simple it is to integrate into existing systems without having to change the backend code at all.

Take a look at this feature list!

  • It’s cloud native and promises very high scalability.
  • We can minimize the coding required to enable the capability, especially on the backend, which would definitely be a bottleneck.
  • Our data engineers and domain specialists can collaborate on the project and create value together instead of separately.
  • It simplifies the search development process, since it doesn’t require in-depth technical knowledge about defining optimized indexes.
  • It’s low maintenance and easy to organize large data volumes
  • It’s simple to manage and configure search rules to improve search accuracy, even giving us the option to fine-tune with AI.
  • There are very easy-to-use frontend SDKs that can integrate with our existing frontend application.
  • It provides pre-configured analytics and KPIs, reducing the development cost even more.
  • It supports sending events from the frontend to further improve accuracy and power analytics.

For these reasons, I decided to build the PoC for our new search indexing capability using Algolia.

In the second article of this series, I will cover the design specification of the PoC and talk about the implementation possibilities.

In the third article of this series, I will implement the data ingestion into Algolia and figure out how to keep that data up-to-date.

In the fourth article of this series, I will implement a sample frontend so we can evaluate the product from the user’s perspective and give the developers a head-start if they choose to go with this option.

About the author
Soma Osvay

Full Stack Engineer, Starschema

Recommended Articles

Powered byAlgolia Algolia Recommend

Part 2: Supercharging search for ecommerce solutions with Algolia and MongoDB — Proposed solution and design
engineering

Soma Osvay

Full Stack Engineer, Starschema

Comparing Algolia and Elasticsearch for Consumer-Grade Search Part 3: Developer Experience and UX
product

Josh Dzielak

Comparing the best e-commerce search solutions
e-commerce

Matthieu Blandineau
Jon Silvers

Matthieu Blandineau &

Jon Silvers