FAQ

This FAQ is still a work in progress.
If you have any questions we want to hear from you. Your feedback will help us improve this page!

I have never used a search engine before. Can I use MeiliSearch anyway?

Of course! No knowledge of ElasticSearch or Solr is required to use MeiliSearch.

MeiliSearch is really easy to use and thus accessible to all kinds of developers.

Take a quick tour to learn the basics of MeiliSearch!

We also provide a lot of tools, including SDKs, to help you integrate easily MeiliSearch in your project. We’re adding new tools every day!

Plus, you can contact us if you need any help. We will answer for sure!

Do I need to configure MeiliSearch to get it working?

MeiliSearch configuration works out-of-the-box. It means, by default, MeiliSearch configures necessary settings for providing a powerful and relevant search.

For example, without requiring any configuration, MeiliSearch is typo tolerant.
Type craete an inedx in the search bar of this documentation to experience the typo tolerance of our search engine.

To find out more about the relevancy of MeiliSearch, take a look at this detailed explanation.

However, MeiliSearch is of course highly customizable in order to adapt the search to your needs by setting synonyms, stop words, and custom ranking rules.

How to know if MeiliSearch perfectly fits my use cases?

Since MeiliSearch is an open-source and easy-to-use tool, you can give it a try using your data. Follow this guide to get a quick start!

Besides, we published a comparison between MeiliSearch and other search engines with the goal of providing an overview of MeiliSearch alternatives.

Which languages can MeiliSearch handle?

MeiliSearch works perfectly with English, kanji, and Romance languages.
If you have any hesitation about your language handling, please contact us.

Do you provide a real dataset to test MeiliSearch?

For now, we provide this movies dataset❓ FAQ - 图1 (opens new window). More datasets are coming soon!

I did a call to an API route, and I only got an updateId as a response. What does it mean?

MeiliSearch is an asynchronous API.
It means that in many cases (e.g., documents addition), you will receive as server response a simple JSON containing only an updateId attribute. For example:

  1. {
  2. "updateId": 2
  3. }

This kind of successful response indicates that the operation has been taken into account, but may not have been executed yet.

TIP

You can check the status of the operation using the updateId via the get update status route.
In addition, MeiliSearch delivers a global route to track all your update status.
This way, you will be informed if your action was processed or not, and why.

If you are curious about how the asynchronous part of MeiliSearch works, you can find more information here.

I am trying to add my documents but I keep receiving a 400 - Invalid data response.

MeiliSearch API only accepts JSON format.
In case of a document addition, only an array of objects is expected.

The 400 - Invalid data response probably means that your data is not in an expected format.

Most common errors:

  • Extraneous comma at the end of a line.
  • Data is not an array of objects: for the document addition route, MeiliSearch only accepts an array in the body even if there is only one document.

Wrong:

  1. { "id": 123, "title": "Pride and Prejudice" }

Good:

  1. [{ "id": 123, "title": "Pride and Prejudice" }]

TIP

The jq❓ FAQ - 图2 (opens new window) command line tool can greatly help you check the format of your data.

  1. cat your_file.json | jq

My document upload failed with the document id is missing error.

TLDR;

Most common reasons:

  • A unique identifier in your document is missing.
  • The unique identifier of your document is not well-formatted.

Each document is required to contain a unique identifier. This identifier attribute is the primary key.

How do I know the primary key of my index? Check this route. The null value means it has not been defined yet.

By default, the primary key will be inferred from the first document received. MeiliSearch will search for an attribute that contains the string id in a case-insensitive manner (e.g., uid, MovieId, ID, 123id123). If none has been found, no documents will be added.

If you get a document id is missing error, the primary key was not recognized. This means your primary key is wrongly formatted. Sending primary key’s name as a query parameter when adding documents should solve this issue.

Note that the primary key value must contain only A-Z a-z 0-9 and -_ characters.

Wrong:

  1. "id": "@BI+* ^5h2%"

Good:

  1. "id": "_Aabc012_"

See more information about the primary key.

I have uploaded my documents, but I get no result when I search in my index.

Your documents upload probably failed.
To understand what happened, please check this answer.

Is killing a MeiliSearch process safe?

Killing MeiliSearch is safe, even in the middle of a process (ex: adding a batch of documents). When you restart the server, it will start the task from the beginning.
More information in the asynchronous updates guide.

Does MeiliSearch deliver an interface to search in my documents?

Yes, a web interface is available on the default address and port of your MeiliSearch instance.

All you need to do is open your web browser and enter MeiliSearch’s address to visit it. This leads you to a web page with a search bar that allows you to search in a selected index.

Since the production environment requires an API-key for searching, the web interface is only available in development mode.

Here is more information about the MeiliSearch web interface.

I do not understand the relevancy of my search results.

The search responses are sorted according to a set of consecutive rules called ranking rules.
Here is more information about the relevancy of MeiliSearch.

MeiliSearch applies these ranking rules in default order. This order can be modified. Furthermore, these rules can be deleted and new ones can be added.
All of the ranking rules can be modified via the dedicated routes in the MeiliSearch API.

Do you provide a public roadmap for MeiliSearch and its integration tools?

Yes, as MeiliSearch and its integration tools are opensource, we maintain a public roadmap❓ FAQ - 图3 (opens new window) for the general features we plan to do.

For more accurate features and issues, everything is detailed in the issues of all our GitHub repositories❓ FAQ - 图4 (opens new window).

How can I contact the MeiliSearch team?

See our contact page.

I have just updated MeiliSearch, and I am getting an error: “Cannot open database, expected MeiliSearch engine version…”

Until our first stable release (v1.0), MeiliSearch minor versions are not compatible with each other, i.e. every new version is considered breaking with the small exception of bug-fixing patches. To fix this error, simply delete your database folder (data.ms by default) and re-index your documents with the current-version engine. See updating MeiliSearch for more information.

What are the recommended requirements for hosting a MeiliSearch instance?

Short answer: It’s impossible to say. We recommend experimenting with RAM availability and database size to find the hardware + relevancy setup that works best for your dataset.

Long answer: The disk size and RAM usage of your MeiliSearch database can vary widely. The following factors have a great effect on space and memory use:

  • The number of documents
  • The size of documents
  • The number of indexed fields
  • The number of faceted fields
  • The size of each update
  • The number of different words present in documents (beware heavily multi-lingual datasets and fields with unique words, such as IDs)

All of this means that it’s almost impossible to estimate the size and memory usage of a MeiliSearch database before creation, even based on the size of its documents. There are, however, a few general principles you should know.

How does hardware affect search speed?

Because MeiliSearch uses a memory map, search speed is based on the ratio between RAM and database size. In other words:

  • A big database + a small amount of RAM => slow search
  • A small database + tons of RAM => lightning fast search

MeiliSearch also uses disk space as virtual memory. This disk space does not correspond to database size; rather, it provides speed and flexibility to the engine by allowing it to go over the limits of physical RAM.

At this time, the number of CPU cores has no direct impact on index or search speed. However, the more cores you provide to the engine, the more search queries it will be able to process at the same time.

TIP

Our new engine (currently in development) will support multi-core indexing at launch.

Speeding Up MeiliSearch

MeiliSearch is designed to be fast (≤50ms response time), so speeding it up is rarely necessary. However, if you find that your MeiliSearch instance is querying slowly, there are two primary methods to speed it up:

  1. Increase the amount of RAM (or virtual memory)
  2. Reduce the size of the database

In general, we recommend the former. However, if you need to reduce the size of your database for any reason, keep in mind that:

  • More relevancy rules => a larger database
    • The proximity ranking rule alone can be responsible for almost 80% of database size
  • Faceting also consumes a large amount of disk space
  • Multi-lingual datasets are costly, so split your dataset—one language per index
  • Stop words are essential to reducing database size
  • Not all attributes need to be searchable. Avoid indexing unique IDs.