Skip to content

Commit

Permalink
The max size of a key in LMDB is actually 511, not 512. (#3071)
Browse files Browse the repository at this point in the history
  • Loading branch information
dureuill authored Dec 11, 2024
1 parent 310647c commit 00d08ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions learn/resources/known_limitations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ If your query is `Hello - World`:

## Length of primary key values

**Limitation:** Primary key values are limited to 512 bytes.
**Limitation:** Primary key values are limited to 511 bytes.

**Explanation:** Meilisearch stores primary key values as LMDB keys, a data type whose size is limited to 512 bytes. If a primary key value exceeds 512 bytes, the task containing these documents will fail.
**Explanation:** Meilisearch stores primary key values as LMDB keys, a data type whose size is limited to 511 bytes. If a primary key value exceeds 511 bytes, the task containing these documents will fail.

## Length of individual `filterableAttributes` values

**Limitation:** Individual `filterableAttributes` values are limited to 468 bytes.

**Explanation:** Meilisearch stores `filterableAttributes` values as keys in LMDB, a data type whose size is limited to 512 bytes, to which Meilisearch adds a margin of 44 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 468 bytes.
**Explanation:** Meilisearch stores `filterableAttributes` values as keys in LMDB, a data type whose size is limited to 511 bytes, to which Meilisearch adds a margin of 44 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 468 bytes.

## Maximum filter depth

Expand Down

0 comments on commit 00d08ff

Please sign in to comment.