FAQ

Table of contents

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 , 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 .

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 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 . More datasets are coming soon!

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:

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 .
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.

The 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 , MeiliSearch only accepts an array in the body even if there is only one document.

Wrong:

    Good:

    TIP

    The jq❓ FAQ - 图1 (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? . 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, , 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:

    Good:

    1. "id": "_Aabc012_"

    See more .

    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 .

    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 .

    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 .

    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 (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 .

    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 for more information.

    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 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 . 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.

    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
    • More relevancy rules => a larger database
      • The proximity ranking rule alone can be responsible for almost 80% of database size
    • 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