Known limitations

    Currently, Meilisearch has a number of known limitations. Some of these limitations are the result of intentional design trade-offs, while others can be attributed to LMDB, the key-value store that Meilisearch uses under the hood.

    This guide covers hard limits that cannot be altered. Meilisearch also has some default limits that can be changed, such as a default payload limit of 100MB and a default search limit of 20 hits.

    Maximum number of query words

    Limitation: The maximum number of terms taken into account for each search query is 10. If a search query includes more than 10 words, all words after the 10th will be ignored.

    Explanation: Queries with many search terms can lead to long response times. This goes against our goal of providing a fast search-as-you-type experience.

    Maximum number of words per attribute

    Limitation: Meilisearch can index a maximum of 65535 positions per attribute. Any words exceeding the 65535 position limit will be silently ignored.

    Explanation: This limit is enforced for relevancy reasons. The more words there are in a given attribute, the less relevant the search queries will be.

    Example

    Suppose you have three similar queries: Hello World, Hello, World, and Hello - World. Due to how our tokenizer works, each one of them will be processed differently and take up a different number of "positions" in our internal database.

    If your query is Hello World:

    If your query is Hello, World:

    NOTE

    , takes 8 positions as it is a hard separator. You can read more about word separators in our article about data types.

    If your query is Hello - World:

    NOTE

    - takes 1 position as it is a soft separator. You can read more about word separators in our article about data types.

    Maximum number of attributes per document

    Limitation: Meilisearch can index a maximum of 65,536 attributes per document. If a document contains more than 65,536 attributes, an error will be thrown.

    Explanation: This limit is enforced for performance and storage reasons. Overly large internal data structures—resulting from documents with too many fields—lead to overly large databases on disk, and slower search performance.

    Maximum number of documents in an index

    Limitation: An index can contain no more than 4,294,967,296 documents.

    Explanation: This is the largest possible value for a 32-bit unsigned integer. Since Meilisearch's engine uses unsigned integers to identify documents internally, this is the maximum number of documents that can be stored in an index.

    Length of individual filterableAttributes values

    Limitation: Individual filterableAttributes values are limited to 500 bytes.

    Explanation: Meilisearch stores filterableAttributes values as keys in LMDB, a data type whose size is limited to approximately 500 bytes. Note that this only applies to individual values—for example, a genres attribute can contain any number of values such as horror, comedy, or cyberpunk as long as each one of them is smaller than 500 bytes.

    Maximum filter depth

    Limitation: searches using the filter search parameter may have a maximum filtering depth of 2000.

    Explanation: mixing and alternating AND and OR operators filters creates nested logic structures. Excessive nesting can lead to stack overflow.

    Example

    The following filter is composed of a number of filter expressions. Since these statements are all chained with OR operators, there is no nesting:

    genre = "romance" OR genre = "horror" OR genre = "adventure"
    

    Replacing OR with AND does not change the filter structure. The following filter's nesting level remains 1:

    genre = "romance" AND genre = "horror" AND genre = "adventure"
    

    Nesting only occurs when alternating AND and OR operators. The following example fetches documents that either belong only to user 1, or belong to users 2 and 3:

    # AND is nested inside OR, creating a second level of nesting
    user = 1 OR user = 2 AND user = 3
    

    Adding parentheses can help visualizing nesting depth:

    # Depth 2
    user = 1 OR (user = 2 AND user = 3)
    
    # Depth 4
    user = 1 OR (user = 2 AND (user = 3 OR (user = 4 AND user = 5)))
    
    # Though this filter is longer, its nesting depth is still 2
    user = 1 OR (user = 2 AND user = 3) OR (user = 4 AND user = 5) OR user = 6
    

    Size of integer fields

    Limitation: Meilisearch can only exactly represent integers between -2⁵³ and 2⁵³.

    Explanation: Meilisearch stores numeric values as double-precision floating-point numbers. This allows for greater precision and increases the range of magnitudes that Meilisearch can represent, but leads to inaccuracies in values beyond certain thresholds.

    Limitation: By default, Meilisearch returns up to 1000 documents per search.

    Explanation: Meilisearch limits the maximum amount of returned search results to protect your database from malicious scraping. You may change this by using the maxTotalHits property of the pagination index settings. maxTotalHits only applies to the search route and has no effect on the get documents with POST and get documents with GET endpoints.

    Large datasets and internal errors

    Limitation: Meilisearch might throw an internal error when indexing large batches of documents.

    Explanation: Indexing a large batch of documents, such as a JSON file over 3.5GB in size, can result in Meilisearch opening too many file descriptors. Depending on your machine, this might reach your system's default resource usage limits and trigger an internal error. Use ulimit or a similar tool to increase resource consumption limits before running Meilisearch. For example, call ulimit -Sn 3000 in a UNIX environment to raise the number of allowed open file descriptors to 3000.

    Maximum database size

    Limitation: Meilisearch supports a maximum index size of around 80TiB on Linux environments. For performance reasons, Meilisearch recommends keeping indexes under 2TiB.

    Explanation: Meilisearch can accommodate indexes of any size as long the combined size of active databases is below the maximum virtual address space the OS devotes to a single process. On 64-bit Linux, this limit is approximately 80TiB.

    Maximum task database size

    Limitation: Meilisearch supports a maximum task database size of 10GiB.

    Explanation: Depending on your setup, 10GiB should correspond to 5M to 15M tasks. Once the task database contains over 1M entries (roughly 1GiB on average), Meilisearch tries to automatically delete finished tasks while continuing to enqueue new tasks as usual. This ensures the task database does not use an excessive amount of resources. If your database reaches the 10GiB limit, Meilisearch will log a warning indicating the engine is not working properly and refuse to enqueue new tasks.

    Maximum number of indexes in an instance

    Limitation: Meilisearch can accommodate an arbitrary number of indexes as long as their size does not exceed 2TiB. When dealing with larger indexes, Meilisearch can accommodate up to 20 indexes as long as their combined size does not exceed the OS's virtual address space limit.

    Explanation: While Meilisearch supports an arbitrary number of indexes under 2TiB, accessing hundreds of different databases in short periods of time might lead to decreased performance and should be avoided when possible.

    Facet Search limitation

    Limitation: When searching for facet values, Meilisearch returns a maximum of 100 facets.

    Explanation: the limit to the maximum number of returned facets has been implemented to offer a good balance between usability and comprehensive results. Facet search allows users to filter a large list of facets so they may quickly find categories relevant to their query. This is different from searching through an index of documents. Faceting index settings such as maxValuesPerFacet limit the have no impact in facet search and only affect queries searching through documents.