From 0d47a811c8891cfa9f3552b831f3c616be94db52 Mon Sep 17 00:00:00 2001 From: anujagnihotry <63372883+anujagnihotry@users.noreply.github.com> Date: Sun, 17 May 2026 10:25:42 +0530 Subject: [PATCH] Update synonyms documentation for Meilisearch Clarified the behavior of synonym handling in Meilisearch, including limitations on term length and maximum synonyms per term. --- .../full_text_search/relevancy/synonyms.mdx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/capabilities/full_text_search/relevancy/synonyms.mdx b/capabilities/full_text_search/relevancy/synonyms.mdx index 2a3f6bfe8..507a58cb2 100644 --- a/capabilities/full_text_search/relevancy/synonyms.mdx +++ b/capabilities/full_text_search/relevancy/synonyms.mdx @@ -170,7 +170,20 @@ Suppose you set `San Francisco` and `SF` as synonyms with a [mutual association] -If you input `SF` as a search query, Meilisearch will also return results containing the phrase `San Francisco`. However, depending on the ranking rules, they might be considered less [relevant](/capabilities/full_text_search/relevancy/relevancy) than those containing `SF`. The reverse is also true: if your query is `San Francisco`, documents containing `San Francisco` may rank higher than those containing `SF`. +If you input `SF` as a search query, Meilisearch will also return results containing the phrase `San Francisco`. + + + +However, depending on the ranking rules, they might be considered less [relevant](/capabilities/full_text_search/relevancy/relevancy) than those containing `SF`. The reverse is also true: if your query is `San Francisco`, documents containing `San Francisco` may rank higher than those containing `SF`. + +## Synonym term length limitation + +Meilisearch only fetches synonyms for search terms that are between 1 and 3 words. Terms with 4 or more words will not return any synonym matches. + +For example, if you set `"lord of the rings"` as a synonym for `"lotr"`, searching for `"lotr"` will return documents containing `"lord of the rings"`. However, if you search for `"lord of the rings"`, Meilisearch will not return documents containing `"lotr"` because the search term has more than 3 words. + +This limitation applies regardless of how you configure your synonyms. To work around this, consider using shorter synonym terms or breaking longer phrases into multiple single-word synonyms. + ## Maximum number of synonyms per term