Blog

Introduction to Meilisearch

Michael Born June 30, 2022

Spread the word

Michael Born

June 30, 2022

Spread the word


Share your thoughts

This is an honest introduction to Meilisearch, the hottest new search engine offering power and speed in a simple package.

What Is Meilisearch?

Meilisearch is a new open-source search engine built for speed and simplicity. Meilisearch offers a RESTful API, a prebuilt Docker image for easy deployment, and a loosely typed document structure for zero-config document storage.

Why Meilsearch?

Meilisearch has several benefits and neat features that other search engines may not offer:

  • Simplicity
  • Loosely Typed Documents
  • Idempotent Document Management
  • Fuzzy By Default
  • Search Speed
  • Indexing Speed
  • API Key Management

Simplicity

Meilisearch's simplicity is its strongest selling point, making it very easy to get started using Meilisearch without needing to learn dozens of API endpoints or watch an entire webinar on how fuzzy search works.

Loosely Typed Documents

Documents in Meilisearch are loosely typed, meaning that an "age" field (for example) could be an integer in one document and a string in the next document. This may seem like a downside from an engineering standpoint, but it means that you do not need to worry about type errors when indexing documents.

Idempotent Document Management

Meilisearch also provides idempotent document CRUD endpoints such as [Documents.AddOrReplace](https://docs.meilisearch.com/reference/api/documents.html#add-or-replace-documents), which is extremely helpful for

  1. Avoiding the creation of duplicate documents
  2. Avoiding errors upon inserting duplicate documents
  3. Easily updating a document in place without worrying about whether the document already exists or not.

The document "AddOrReplace" endpoint is also extremely useful for "cleaning" index data. For example, in the case of a document with bad data, you can re-insert the document without worrying about re-indexing the entire index in a migration.

Fuzzy By Default

Tying in with the "Meilisearch is simple" concept, Meilisearch is also fuzzy by default, meaning that it will do typo correction by default, with no configuration necessary. While many other facets and features are involved in fuzzy search, typo correction is one of the biggest ones (and a must-have, in my opinion), so it's great that Meilisearch offers this must-have feature out of the box.

PS. For more information on how Fuzzy Search works, check out my free webinar on Clearing the Fuzzies on Fuzzy Search.

Search Speed

Meilisearch is lightning-quick when it comes to searching documents. This is great if you struggle with slow database searches (or have no search at all). Meilisearch's speed makes it a fantastic choice for "instant search" experiences, where the most relevant search results appear as you type.

Note: In my tests, there was little to no difference in search speed between Elasticsearch and Meilisearch. This is great news, knowing that Elasticsearch is also a hyper-fast search engine

Indexing Speed

When "ingesting" or indexing new content, I've noticed that Meilisearch's index analysis can be a bit faster than the same process in Elasticsearch. This may be due to Meilisearch's loosely typed nature, where each document can have a different structure, and each field can have whatever data type it likes.

Regardless of the cause, the data is clear: Meilisearch indexing is just plain faster than Elasticsearch indexing. (In my case, about 30% faster)

In Elasticsearch, indexing 1000 reviews takes from 6-7 seconds:

Elasticsearch ingest speed for indexing 1000 reviews

Compared to Meilisearch, indexing the same 1000 reviews takes from 4-6 seconds:

Meilisearch ingest speed for indexing 1000 reviews

API Key Management

In addition to powerful, fast search functionality, Meilisearch offers sophisticated API key authentication at all endpoints. Developers can quickly and easily lock down Meilisearch API access and even fine-tune different API keys for different indexes - much like a database user may only have access to a single database.

This functionality comes with a caveat: There is no ability to manage API keys from the Meilisearch Admin Dashboard, so you'll have to create, view, and manage keys through the API itself... which seems to make the Admin Dashboard a bit underwhelming for "Admins.”

Meilisearch Drawbacks

Not everything is wine and roses when it comes to Meilisearch features. There are a few drawbacks you should consider before jumping in with both feet:

No Scalability

The biggest downside to Meilisearch is the lack of support for scaling Meilisearch beyond a single instance (node). Meilisearch's focus is on providing fast search results with simple implementation and integration and has not prioritized scalability. This alone makes Meilisearch a no-go for certain companies and datasets.

However, it seems some work has been done in this area in the last few months - see discussion on the GitHub Meilisearch repository.

Offline Documentation

I have seen the Meilisearch API reference documentation go offline several times while reading the documentation. This makes it challenging to learn about Meilisearch when the Meilisearch docs are down.

Multiple Identical Search Endpoints Are Confusing

While this is not a significant downside to using Meilisearch, I thought it worth mentioning. Meilisearch supports two different API methods (POST and GET) for the same Search API call. One is preferred, while the other is an optional method for better cacheability. I see this as no more than a point of potential confusion.

Conclusion

Meilisearch is a simpler alternative to Elasticsearch while offering powerful features with a lightning-quick search interface. If you want to add a new search form to your website, Meilisearch should be your first choice.

Add Your Comment

Recent Entries

The 12 Days of Christmas - ITB 2022 Video Release— Day 2 - New Modules

The 12 Days of Christmas - ITB 2022 Video Release— Day 2 - New Modules

It's that time of year again. Trees are lit, presents are being wrapped, and relatives are coming to visit. That's right, it's time again for the 12 days of Christmas-- 2022 ITB Video Release Edition! 

Today, Day 2's Videos from Into the Box 2022 Conference, are all newly announced modules.

Gavin Pickin
Gavin Pickin
December 09, 2022
The 12 Days of Christmas - ITB 2022 Video Release— Day 1

The 12 Days of Christmas - ITB 2022 Video Release— Day 1

It's that time of year again.  Trees are lit, presents are being wrapped, and relatives are coming to visit.  That's right, it's time again for the 12 days of Christmas-- 2022 ITB Video Release Edition!

For the next 12 business days up until Christmas, we'll be releasing a series of related videos each day on the CFCasts site for our CFCasts Subscribers, and a announcement with titles, descriptions, and links to the videos, right here on the Ortus blog.  Consider it our early Christmas gift to you.

Gavin Pickin
Gavin Pickin
December 08, 2022
CommandBox Docker v3.6.3 Images Released

CommandBox Docker v3.6.3 Images Released

CommandBox 3.6.3 Docker images released



Today we are pleased to announce the release of version 3.6.3 of our CommandBox Docker images, which contains significant upgrades to the underlying CommandBox engine.

Most significantly, this release upgrades the CommandBox binary to 5.7.0. Read the Release Notes for this version here. This image version also adds new distro builds for the RHEL Universal Base Image. These images may be utilized by using the ubi9 in the image tag in the same way the alpine base images currently do.

Jon Clausen
Jon Clausen
December 08, 2022