# Elasticsearch Resources

Curated, high-trust sources. Knowledge in lessons is drawn from here — not from
parametric guesses. Focus areas: **(1) Relevance & scoring · (2) Internals &
architecture · (3) Performance & ops · (4) Query DSL & aggregations.**

## Knowledge

### Official Documentation (current)

- [Query and filter context — Elastic Docs](https://www.elastic.co/docs/reference/query-languages/query-dsl/query-filter-context)
  The yes/no filter vs. scored query distinction and filter caching. Use for: (1), (4).
- [Query DSL reference — Elastic Docs](https://www.elastic.co/docs/reference/query-languages/query-dsl)
  Full leaf/compound query catalog (bool, match, term, nested…). Use for: (4).
- [Aggregations reference — Elastic Docs](https://www.elastic.co/docs/reference/aggregations)
  Metric, bucket, and pipeline aggregations with examples. Use for: (4).
- [Analyzer reference — Elastic Docs](https://www.elastic.co/docs/reference/text-analysis/analyzer-reference)
  char filters → tokenizer → token filters; index vs. search analyzers. Use for: (1), (3).
- [Mapping reference — Elastic Docs](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference)
  Field data types, dynamic vs. explicit mapping, mapping params. Use for: (3).
- [Similarity (BM25) settings — Elastic Docs](https://www.elastic.co/docs/reference/elasticsearch/index-settings/similarity)
  Per-field similarity, BM25 `k1`/`b`, defaults. Use for: (1).
- [Size your shards — Elastic Docs](https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/size-shards)
  Authoritative shard-sizing guidance (10–50 GB / <200M docs / node limits). Use for: (2), (3).

### Practitioner articles (Elastic Blog / Labs)

- [How many shards should I have? — Elastic Blog](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)
  Classic capacity-planning post. Use for: (2), (3).
- [Shard & node size best practices — Elasticsearch Labs](https://www.elastic.co/search-labs/blog/elasticsearch-node-shard-size-best-practices)
  Modern update (post-8.3; retires old "20 shards/GB heap" rule). Use for: (3).
- [Practical BM25 — Part 1: How Shards Affect Scoring (Shane Connelly)](https://www.elastic.co/blog/practical-bm25-part-1-how-shards-affect-relevance-scoring-in-elasticsearch)
  Why scores differ across shards (`dfs_query_then_fetch`). Use for: (1).
- [Practical BM25 — Part 2: The BM25 Algorithm (Shane Connelly)](https://www.elastic.co/blog/practical-bm25-part-2-the-bm25-algorithm-and-its-variables)
  **Best plain-English derivation of the BM25 formula.** Use for: (1).
- [Practical BM25 — Part 3: Picking b and k1 (Shane Connelly)](https://www.elastic.co/blog/practical-bm25-part-3-considerations-for-picking-b-and-k1-in-elasticsearch)
  Tuning saturation / length-normalization knobs. Use for: (1).
- [Improved Text Scoring with BM25 (Britta Weber, slides)](https://speakerdeck.com/elastic/improved-text-scoring-with-bm25)
  BM25 vs. TF/IDF and why BM25 became the default. Use for: (1).

### Books

- [Relevant Search — Turnbull & Berryman, Manning (2016)](https://www.manning.com/books/relevant-search)
  Definitive text on relevance engineering (debugging scores, signals, function scoring). Engine-agnostic. Use for: (1), (4).
- [Elasticsearch: The Definitive Guide — Gormley & Tong (free, legacy 2.x)](https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html)
  Version-outdated but the best free long-form conceptual treatment of internals & relevance. Key chapters:
  - [Inverted index](https://www.elastic.co/guide/en/elasticsearch/guide/current/inverted-index.html) → (2)
  - [Scoring theory](https://www.elastic.co/guide/en/elasticsearch/guide/current/scoring-theory.html) → (1)
  - [Segments & merge process](https://www.elastic.co/guide/en/elasticsearch/guide/current/merge-process.html) → (2)
  - ⚠️ Verify all API/settings syntax against **current** docs — 2.x defaults differ.

## Wisdom (Communities)

- [Discuss the Elastic Stack — official forum](https://discuss.elastic.co/c/elasticsearch)
  Most active place for authoritative answers; Elastic engineers participate. Use for: all areas.
- [Stack Overflow — `elasticsearch` tag](https://stackoverflow.com/questions/tagged/elasticsearch)
  High-volume Q&A for concrete query/mapping/ops problems. Use for: (3), (4).
- [r/elasticsearch — Reddit](https://www.reddit.com/r/elasticsearch/)
  Ops war-stories, migration talk. Lower rigor; useful real-world context. Use for: (3).

## Gaps (weak free-resource coverage — drives future search)

- **Cluster coordination internals (2)** — no great free deep-dive on Zen2
  master-election/quorum. Closest: Elastic engineering "distributed consensus" posts.
- **Slow-query troubleshooting (3)** — weakest-covered area. Knowledge scattered;
  anchor on Profile API + Slow Log docs plus assorted blog posts.
- **Nested vs. join/parent-child modeling (4)** — official docs terse; no standout
  free tutorial. Pair docs with *Relevant Search*.
- **Maintained long-form book for 8.x/9.x** — none free; depth lives in scattered
  docs + Labs blog posts.
