The corpus
One index, shared by every chapter, so a document frequency you see in chapter 8 is the same one chapter 27 is planning around. It contains repeated terms for saturation, wildly different field lengths for length normalisation, a deliberate misspelling for fuzzy search, shared prefixes for the trie and FST, prices for the point index, and coordinates for BKD.
The corpus
28 documents. Small enough to hold in your head, varied enough to exercise every structure in the book.
documents
28
title vocabulary
71
body vocabulary
423
avg title length
3.61terms
Documents
| id | title | status | price | rating |
|---|---|---|---|---|
| published | 149.99 | 4.7 | ||
| published | 89.5 | 4.2 | ||
| published | 129 | 4.9 | ||
| draft | 10 | 2.1 | ||
| published | 79.99 | 4.5 | ||
| published | 199 | 4.8 | ||
| draft | 39 | 3.4 | ||
| published | 159 | 4.6 | ||
| published | 0 | 4.9 | ||
| published | 249 | 4.4 | ||
| published | 119 | 4.1 | ||
| published | 99 | 4.3 | ||
| published | 0 | 4 | ||
| published | 0 | 4.8 | ||
| archived | 29 | 3.2 | ||
| published | 179 | 4.7 | ||
| published | 139 | 4.2 | ||
| published | 209 | 4.5 | ||
| published | 0 | 4.9 | ||
| published | 299 | 4.3 | ||
| published | 109 | 4 | ||
| draft | 5 | 1.4 | ||
| published | 0 | 5 | ||
| published | 0 | 5 | ||
| published | 189 | 4.6 | ||
| archived | 59 | 3.8 | ||
| published | 169 | 4.4 | ||
| published | 0 | 4.5 |
doc-1
Kubernetes Deployment Guide
{
"id": "doc-1",
"title": "Kubernetes Deployment Guide",
"body": "A deployment manages a replica set. The deployment controller reconciles desired state with observed state. Rolling updates replace pods gradually so the service stays available.",
"status": "published",
"tags": [
"kubernetes",
"deployment",
"guide"
],
"author": "user_123",
"price": 149.99,
"rating": 4.7,
"created_at": "2026-01-14",
"lat": 37.77,
"lon": -122.42
}title → indexed terms
kubernetes0deployment1guide2
- title length
- 3 terms
- body length
- 25 terms
- tags
- kubernetes, deployment, guide
- location
- 37.77, -122.42
Mapping
| field | type | behaviour |
|---|---|---|
| title | text | Analyzed into terms. Short field, so length normalisation bites hard. |
| body | text | The long field. Where phrase queries and BM25 length normalisation matter. |
| status | keyword | Not analyzed. `published` is one term, never `publish`. |
| tags | keyword | Multi-valued keyword. Each value is its own term in the same field. |
| author | keyword | Exact identity. Analyzing this would be a bug. |
| price | numeric | Indexed as a point, not a term. |
| rating | numeric | Point index; also used by scripted scoring. |
| created_at | date | A date is a number wearing a costume. |
| location | geo_point | Two dimensions -> KD/BKD territory. |
Vocabulary
71 distinct terms, 96 postings entries
| term | docFreq | totalTermFreq | |
|---|---|---|---|
| and | 2 | 2 | |
| autoscaling | 1 | 1 | |
| bkd | 1 | 1 | |
| bm25 | 1 | 1 | |
| caching | 1 | 1 | |
| classes | 1 | 1 | |
| cloud | 1 | 1 | |
| cluster | 2 | 2 | |
| clusters | 3 | 3 | |
| compose | 1 | 1 | |
| consumer | 1 | 1 | |
| cost | 1 | 1 | |
| deep | 1 | 1 | |
| deployment | 5 | 8 | |
| dictionaries | 1 | 1 | |
| dive | 1 | 1 | |
| docker | 2 | 2 | |
| dsl | 1 | 1 | |
| elasticsearch | 1 | 1 | |
| explained | 1 | 1 | |
| for | 3 | 3 | |
| fst | 1 | 1 | |
| guide | 1 | 1 | |
| immutable | 1 | 1 | |
| in | 1 | 1 | |
| index | 1 | 1 | |
| infrastructure | 1 | 1 | |
| internals | 1 | 1 | |
| kafka | 2 | 2 | |
| kubernetes | 8 | 10 | |
| kubernets | 1 | 1 | |
| layout | 1 | 1 | |
| local | 1 | 1 | |
| lucene | 1 | 1 | |
| merging | 1 | 1 | |
| mesh | 1 | 1 | |
| module | 1 | 1 | |
| networking | 1 | 1 | |
| nginx | 1 | 1 | |
| notes | 2 | 2 | |
| numeric | 1 | 1 | |
| observability | 1 | 1 | |
| of | 1 | 1 | |
| operators | 1 | 1 | |
| ordering | 1 | 1 | |
| partitions | 1 | 1 | |
| patterns | 1 | 1 | |
| postgres | 1 | 1 | |
| practice | 1 | 1 | |
| proxy | 1 | 1 | |
| query | 1 | 1 | |
| ranges | 1 | 1 | |
| rebalance | 1 | 1 | |
| redis | 2 | 2 | |
| relevance | 1 | 1 | |
| resharding | 1 | 1 | |
| reverse | 1 | 1 | |
| rollback | 1 | 1 | |
| search | 3 | 3 | |
| segment | 1 | 1 | |
| service | 2 | 2 | |
| setup | 1 | 1 | |
| storage | 1 | 1 | |
| storms | 1 | 1 | |
| strategies | 1 | 1 | |
| term | 1 | 1 | |
| terraform | 1 | 1 | |
| testing | 1 | 1 | |
| trees | 1 | 1 | |
| trie | 1 | 1 | |
| tuning | 2 | 2 |