Elasticsearch
Раздел про Elasticsearch для backend-разработчика: устройство (inverted index, cluster, shards, replicas, mapping, analyzers), Query DSL и relevance scoring (BM25, boosting, aggregations), интеграция со Spring Data Elasticsearch, эксплуатация (ILM, snapshots, hot/warm/cold, sizing, мониторинг).
Why it matters for UCP. Elasticsearch is the standard engine for full-text search, faceting, and near-real-time analytics in UCP services. When
WHERE name ILIKE '%query%'in Postgres gets slow, or you need weighted ranking queries — this is the place. Part of the preparation program.
The section is split into four articles: fundamentals (internals), queries (DSL and relevance), integration (Spring Data ES), operations (ILM/snapshots/sizing). The examples use the same category + product pair as in PostgreSQL / MongoDB, so the approaches are easy to compare.
Section articles
- Fundamentals: inverted index, cluster, shards, mapping, analyzers — how ES stores and searches, why it is fast, what analyzers are, and why mapping matters.
- Query DSL and relevance scoring — match/term/bool, BM25, boosting, faceting via aggregations, typical product-catalog queries.
- Spring Data Elasticsearch: client, repositories, indexing —
ElasticsearchOperations,ElasticsearchRepository, indexing patterns, CDC from PostgreSQL/Mongo via Debezium + Kafka. - Operations: ILM, snapshots, hot/warm/cold, sizing, monitoring — index lifecycle management, backups, tiered storage, performance, Prometheus metrics.
Related
- PostgreSQL — the primary store. ES usually complements it rather than replacing it.
- MongoDB — an alternative for document data. They have different focuses (Mongo is OLTP, ES is search).
- Apache Kafka — the typical transport for syncing PG/Mongo → ES via CDC.
- Distributed patterns — the choice between dual write and CDC when syncing.