Search by Algolia
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

Best practices of conversion-focused ecommerce website design
e-commerce

Best practices of conversion-focused ecommerce website design

The inviting ecommerce website template that balances bright colors with plenty of white space. The stylized fonts for the headers ...

Catherine Dee

Search and Discovery writer

Ecommerce product listing pages: what they are and how to optimize them for maximum conversion
e-commerce

Ecommerce product listing pages: what they are and how to optimize them for maximum conversion

Imagine an online shopping experience designed to reflect your unique consumer needs and preferences — a digital world shaped completely around ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

DevBit Recap: Winter 2023 — Community
engineering

DevBit Recap: Winter 2023 — Community

Winter is here for those in the northern hemisphere, with thoughts drifting toward cozy blankets and mulled wine. But before ...

Chuck Meyer

Sr. Developer Relations Engineer

How to create the highest-converting product detail pages (PDPs)
e-commerce

How to create the highest-converting product detail pages (PDPs)

What if there were a way to persuade shoppers who find your ecommerce site, ultimately making it to a product ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

Highlights from GopherCon Australia 2023
engineering

Highlights from GopherCon Australia 2023

This year a bunch of our engineers from our Sydney office attended GopherCon AU at University of Technology, Sydney, in ...

David Howden
James Kozianski

David Howden &

James Kozianski

Enhancing customer engagement: The role of conversational commerce
e-commerce

Enhancing customer engagement: The role of conversational commerce

Second only to personalization, conversational commerce has been a hot topic of conversation (pun intended) amongst retailers for the better ...

Michael Klein

Principal, Klein4Retail

Craft a unique discovery experience with AI-powered recommendations
product

Craft a unique discovery experience with AI-powered recommendations

Algolia’s Recommend complements site search and discovery. As customers browse or search your site, dynamic recommendations encourage customers to ...

Maria Lungu

Frontend Engineer

What are product detail pages and why are they critical for ecommerce success?
e-commerce

What are product detail pages and why are they critical for ecommerce success?

Winter is coming, along with a bunch of houseguests. You want to replace your battered old sofa — after all,  the ...

Catherine Dee

Search and Discovery writer

Why weights are often counterproductive in ranking
engineering

Why weights are often counterproductive in ranking

Search is a very complex problem Search is a complex problem that is hard to customize to a particular use ...

Julien Lemoine

Co-founder & former CTO at Algolia

How to increase your ecommerce conversion rate in 2024
e-commerce

How to increase your ecommerce conversion rate in 2024

2%. That’s the average conversion rate for an online store. Unless you’re performing at Amazon’s promoted products ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

How does a vector database work? A quick tutorial
ai

How does a vector database work? A quick tutorial

What’s a vector database? And how different is it than a regular-old traditional relational database? If you’re ...

Catherine Dee

Search and Discovery writer

Removing outliers for A/B search tests
engineering

Removing outliers for A/B search tests

How do you measure the success of a new feature? How do you test the impact? There are different ways ...

Christopher Hawke

Senior Software Engineer

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

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

Here at Algolia, we’re a bunch of hobbyists at heart. We’re not just building for the Fortune 500, we’re also building for the tinkerers. That’s why we’ve put so much effort into tools like DocSearch — we love anybody with the giving-back, open source software mindset behind tools like Astro, Home Assistant, and SASS just as much as React, Twilio, and Discord.

We’ve been cooking up an idea specifically about giving back to the discovery-driven devs that have been experimenting with Algolia since its inception: open indexes. There already exist many open datasets on the Internet, but they’re not exactly known for their quality. Even the high-quality ones aren’t always in the form we need, and there’s little incentive for the makers to give us a hand because they usually aren’t getting paid to maintain their datasets. This feels like the perfect problem for us to tackle here at Algolia, and so a few of us here have been working to design our first open index. Let’s walk through that process in this article; it’ll be fairly conceptual, so it’ll still be useful as a guide for anybody trudging through the occasionally-complex index creation process themselves.

Before we dive in though, we need to talk a bit about composability.

Composability — a big word for small things

Composability is the subjective metric of how useful the pieces of a system are, independently and in different combinations.

In the case of a song, for example, the producer has to think about not only whether the singer had a good take, or whether the guitar was in tune, or whether the drummer in on-beat, but how well those tracks all go together. At different points in the song, different combinations of those tracks are going to be playing at the same time, so they need to work both independently and within a smattering of different contexts. The same goes for pieces of our index.

When you’re creating one for your company, it’s not likely that you’ll have only one application consuming all of the data for a given record all at once — large-scale applications usually request dozens of different combinations of data for different pages and views. But for our index, that effect is incredibly more prominent: we have no idea which bits of data are going to be used by whom, so we need to make sure all of those bits are high-quality and independent from each other, but also easily combinable into high-quality super-structures, just like the music producer wants each recording to work independently while also fitting neatly into the track as a whole, in any configuration.

Let’s try to model out a recipe, specifically this delicious-looking Greek Lemon Chicken and Potatoes recipe from Chef John on Allrecipes. Let’s see if we can start with Allrecipes’ model for this recipe and then improve it to be more specific and composable. As it stands, it seems like the recipe model has this structure:

  • title (string)
  • description (string)
  • times (array of objects)
    • name (string, of a couple predefined options)
    • number (number)
    • unit (string, of a couple predefined options)
  • ingredients (array of objects)
    • amount (number)
    • unit (string, of a couple predefined options)
    • ingredient_name (string)
    • is_header (boolean)
  • directions (array of objects)
    • step_content (string)
    • is_header (boolean)
  • notes (array of objects)
    • title (string)
    • note (string)
  • servings (number)
  • yield (string)
  • public (boolean)
  • media (array of strings, validated as URLs)
  • author (string)

This is already fairly comprehensive! They’re able to do a lot with it, like calculating the total time a recipe will take to complete, the nutrition information, and what the ingredient amounts would be for a different amount of servings. We might make a few suggestions, though:

  1. Allrecipes uses an ingredient line to create a sort of header between ingredients in the list. Our chosen recipe doesn’t use this feature (it doesn’t look like many do), but you could conceive of a situation where you’re instructing the reader about how to make two separate items first before combining them (like the crust and filling of a pie or cheesecake). It’s definitely a useful feature that more recipe writers should take advantage of, but it feels a little strange to not formalize it in the structure of the recipe, choosing instead to use an ingredient line as a “header”, just making the break between the ingredient groups visually and not fundamentally. I might suggest creating a high-level array called ingredient_groups, which contains at least one object with a title (that’s the header text) and an array called ingredients. That header would only be shown if there are multiple groups that need to be delineated, and that internal array would house all of the ingredients for specifically the section under that header. Then we could do away with that pesky is_header boolean they’d otherwise need to render the section titles differently from the rest of the ingredients. This same change would apply to the directions, which similarly use header lines to mark off sections.
  2. Speaking of ingredients, Allrecipes doesn’t actually ask for submitters to split up their ingredients into amount, unit, and item name — they just ask you to input a simple string like this:Recipes ingredients input form exampleI suspect that they’re storing it internally in three pieces because they do math with the number and unit (you can have it convert a 4 serving recipe into 3, which often requires changing units). So this is already somewhat composable, but we can do a little bit better. If we ask for all three of those components individually, we can do some interesting things with it. For example, we could have a list of acceptable ingredients (which users could add to, if their ingredient didn’t already exist in our database), and let users choose the ingredient instead of typing it as a string.In a production environment, we’d have those ingredients in our database, referenced here only by a UUID. Each ingredient would be stored with several form options inside their own database record — for example, I’d call “butter” a single ingredient, with “chilled”, “softened”, “melted”, “sliced”, and “cubed” as optional forms of the one “butter” ingredient. The ingredient could also have its preferred category of units (flour should always be measured by weight or by dry volume, but never by length), which could optionally be custom (like “sticks” of butter) or even empty (you don’t need a special unit for “potatoes”). Then the ingredient form in this particular recipe would be stored in the ingredient object in our recipes index, alongside a unit string matching the available units for this particular ingredient and a validated numerical amount of the ingredient.We might fully release this system in the future (if you’re at a database or CMS company, you know where to find us) but for now, we’re just going to stick that information in a JSON object representing all of the ingredients used in the recipes in the index. It’ll be a bit more manual work for us for now, but everybody consuming the index won’t have to worry about spinning up their own database instance.

Here’s our new recipes index shape:

  • title (string)
  • description (string)
  • times (array of objects)
    • name (string, of a couple predefined options)
    • number (number)
    • unit (string, of a couple predefined options)
  • ingredient_groups (array of objects)
    • title (string)
    • ingredients (array of objects)
      • ingredient (UUID, matching an ingredient in the ingredients JSON)
      • forms (array of strings, matching the forms of the ingredient)
      • amount (number)
      • unit (string, matching one of the unit_categories for this ingredient)
  • direction_groups (array of objects)
    • title (string)
    • directions (array of strings)
  • notes (array of objects)
    • title (string)
    • note (string)
  • servings (number)
  • yield (string)
  • public (boolean)
  • media (array of strings, validated as URLs)
  • author (string)

And then our new ingredients JSON, where each record matches this shape:

  • uuid (UUID)
  • name (string)
  • plural_name (string)
  • unit_categories (array of strings)
  • custom_unit (array of strings, not present unless unit_category contains “custom”)
  • forms (array of strings)

The unit list is a reasonable enough object to just keep in memory as JSON as well, so here’s a little utility JavaScript program to keep track of these units and convert between them easily, made by my coworker Jaden.

Here’s the recipes JSON we’re going to upload to Algolia. For the best results, you’d normally want to store only the things you’ll be searching through in Algolia and then the rest in a quick database like Fauna, yet because this is a test dataset, we’re making everything searchable, which is why the JSON is so big for one recipe. If you’d like to add to this dataset with your personal recipes, we’d love to include them! Just fill out the Google Form here for every recipe, and we’ll filter through and add the best ones manually.

And the part you’ve been waiting for: since this index is open and growing, it’ll be very useful for you to experiment with Algolia and test your own integrations before loading in production-ready data! If you want to give it a try, here are the credentials:

Read-only public key: ea2f27cfed9ddeed93f7532424a64480

Application ID: OKF83BFQS4

Index name: recipes

We’re excited to see what you fill this dataset with (again, the Google Form is available here)! We’ll be improving it on our end with recipes from the hundreds of Algolia devs here on our team. Make sure to give us a shout too on Twitter if you make something fun with the dataset itself!

About the author
Natwar Maheshwari

Developer Marketing Lead

Recommended Articles

Powered byAlgolia Algolia Recommend

Algolia's top 10 tips to achieve highly relevant search results
product

Julien Lemoine

Co-founder & former CTO at Algolia

4 questions to ask for relevant search results
product

Jaden Baptista

Technical Writer

Inside the Algolia Engine Part 2 — The Indexing Challenge of Instant Search
engineering

Julien Lemoine

Co-founder & former CTO at Algolia