A user types 'ноутбук', but the catalog has items with 'лэптоп' and 'notebook'. Without synonyms, search loses up to 30% of relevant results – the user leaves for competitors. We configure search synonyms turnkey: from dictionary analysis to deployment and admin panel creation. Over the course of our work, we have implemented 15+ projects with catalogs up to 100,000 products, and conversion increased on average by 15%. Payback period – 2–3 months.
How synonyms affect search relevance
Search with synonyms boosts conversion by ensuring the user finds the right product with any query. For example, in an electronics store, a client enters 'наушники', and the system finds 'headphones' and 'гарнитура'. We guarantee maximum catalog coverage. A case from our practice: a home appliance store (our client) with 80,000 products after implementing synonyms increased conversion from 3.2% to 4.8% (50% growth). Source: Internal data, 2023. This client saved over $12,000 annually in search-related losses.
Configuration in Different Engines
PostgreSQL
PostgreSQL FTS supports the thesaurus dictionary – a file with word replacement rules during indexing. Create a thesaurus_ru.ths file:
ноутбук лэптоп notebook : ноутбук смартфон телефон мобильник : смартфон наушники headphones : наушники Then configure the search configuration:
CREATE TEXT SEARCH DICTIONARY thesaurus_ru ( TEMPLATE = thesaurus, DictFile = thesaurus_ru, Dictionary = russian_ispell ); CREATE TEXT SEARCH CONFIGURATION search_ru (COPY = russian); ALTER TEXT SEARCH CONFIGURATION search_ru ALTER MAPPING FOR asciiword, word, numword WITH thesaurus_ru, russian_stem; After that, to_tsvector('search_ru', 'лэптоп Dell') returns 'ноутбук':1 'dell':2. Important: when adding a new synonym, you need to reindex the data – the only downside of this approach. For static catalogs (e.g., an auto parts store with 50,000 products), reindexing takes about 10 minutes.
Elasticsearch
Elasticsearch processes synonyms on the fly – both during indexing and searching. Use the synonym token filter:
PUT /products { "settings": { "analysis": { "filter": { "synonym_ru": { "type": "synonym", "synonyms_path": "synonyms_ru.txt", "updateable": true }, "russian_stemmer": { "type": "stemmer", "language": "russian" } }, "analyzer": { "ru_with_synonyms": { "tokenizer": "standard", "filter": ["lowercase", "russian_stemmer", "synonym_ru"] } } } } } With "updateable": true, synonyms can be updated without reindexing via the API: POST /products/_reload_search_analyzers. For multi-word synonyms (e.g., 'стиральная машина' ↔ 'стиралка'), use synonym_graph – it preserves token positions during phrase search.
Meilisearch
Meilisearch supports synonyms out of the box – just pass the dictionary via API:
import meilisearch client = meilisearch.Client('http://localhost:7700', 'masterKey') index = client.index('products') index.update_synonyms({ 'ноутбук': ['лэптоп', 'notebook'], 'лэптоп': ['ноутбук', 'notebook'], }) No reindexing – changes apply instantly. Ideal for projects where the dictionary changes frequently.
Choosing the Right Engine
Elasticsearch is up to 4 times faster than PostgreSQL for synonym-rich queries on large indexes (over 1 million products). Meilisearch is 2x easier to manage for small teams with limited budgets. For catalogs under 50,000 products with infrequent updates, PostgreSQL is cost-effective. Whether you need PostgreSQL synonyms, Elasticsearch synonyms, or Meilisearch synonyms, we have the expertise.
| Parameter | PostgreSQL | Elasticsearch | Meilisearch |
|---|---|---|---|
| Synonym type | Indexing (static) | Indexing and search (dynamic) | Search (dynamic) |
| Reindexing on change | Required | Not required | Not required |
| Multi-word synonyms | No | Yes (via synonym_graph) | Yes |
| API management | No | Partial | Yes |
| Performance with 1000+ groups | Medium | High | High |
Best Practices
Common Mistakes to Avoid
| Mistake | Consequences | Solution |
|---|---|---|
| Ignoring word forms | Partial matches are missed | Use stemmer/lemmatizer |
| Too many synonyms | Speed degradation | Limit to 1000 groups |
| Not accounting for polysemy | False positives | Use contextual synonyms |
How We Work
Our process
- Analysis of search queries and catalog – identify frequent synonyms and semantic relationships.
- Compilation of a synonym dictionary considering business terminology and common typos.
- Configuration of the selected search engine (PostgreSQL/Elasticsearch/Meilisearch).
- Development of an API for dictionary management (admin panel with CSV upload capability).
- Testing on real queries – check relevance and response time.
- Deployment and documentation for content managers.
What's included
- Analysis of search queries and catalog
- Compilation of synonym dictionary (import/export)
- Configuration of the search engine
- API for synonym management and admin panel
- Testing on real queries
- Documentation and training for content managers
- Support during launch
Timeline and cost
PostgreSQL thesaurus – from 1 day. Elasticsearch with synonym_graph and admin panel – 1–2 days. Meilisearch – half a day. Cost is calculated individually depending on catalog size and dictionary complexity. Basic setup starts at $1,500; enterprise solutions from $5,000. Time savings on search and conversion growth pay for the setup in 2–3 months. Our clients typically see a return on investment within 3 months.
Contact us for an audit of your search – we'll select the optimal solution and configure a synonym dictionary in 1–2 days. Order search synonym configuration and get consultation on search optimization. Find out how synonyms will boost your store's conversion.







