● ● ● ● ● ● ● ○ ○ Lesson 7 of 9
Build a docs Skill · A brown-bag
The page exists. The word is right there on it. So why does search return nothing at all?
We now search the whole body (Lesson 3) and rank it well with BM25 (Lesson 6). So
search mysqld — a setting on the self-hosted MySQL page. The result isn't
ranked low. It's not there at all. The word is absent from the index
entirely.
"mysqld (in a config block on the self-hosted MySQL page) was
absent from the index entirely."
— CORPUS.md, Act H
Why? Because when we built the index, we skipped everything inside code fences — the ``` blocks. We treated code as "not real prose" and threw it away. It felt tidy.
But stop and think about what kind of words live in code blocks:
mysqld, pg_hba.conf, hostssl, CLI flags, error
strings, file names. Those are exactly the identifiers a platform
engineer searches for — and exactly the body-only questions we promised to win back in
Lesson 4.
The fix is direct: index the code too. Pull the words inside the
``` fences into the page's searchable text, so mysqld becomes findable.
But with one careful twist. There are two different outputs from a page, and they have different jobs:
So we tokenize code into the search text, but keep it out of the preview. Search gets sharper; the preview stays clean. We also harden how we detect fences, so no block slips through.
Take the self-hosted MySQL page. Its body has a config block:
```
[mysqld]
require_secure_transport = ON
ssl-ca = /etc/teleport/ca.pem
```
Watch what happens to that block, before and after the fix:
"Fix verified:mysqld,hostssl,tbot,spiffeallin_index=True… Index grew 15.5k → 19.8k terms." — CORPUS.md, Act H
That's about 4,300 new searchable terms — over a quarter more — and they are the high-value ones. The cost? Still zero at query time: we tokenize at build time, the shipped skill just has a richer index.
Red: code-fence content was dropped, so
mysqld (and friends) were absent from the index — searching them found
nothing.
Green: code is tokenized into the search text
(in_index = True; 15.5k → 19.8k terms), kept out of the preview. The
body-only evals that depend on code identifiers — pg_hba.conf,
hostssl (eval 13) — now hit reliably.
Another short round of Agile iteration: we probed the index, found a gap, fixed it, and locked it with an eval. Notice the pattern across Lessons 3–7 — every improvement came from testing the thing, not admiring it.
Our search is now genuinely good: body, BM25, code blocks, all guarded by evals. So it's time for the question we've been avoiding. A plain model with web search can read these same public docs through Google. Is our skill actually better — or did we just build a slower Google?
That's the reality check: Lesson 8.
Quick self-check (recall before you peek):
mysqld missing from the index entirely?The indexer dropped everything inside code fences, and
mysqld only appears in a config block — so it was never indexed.
The skill's core value is finding exact identifiers (config keys, flags, file names, errors) — and those live disproportionately in code blocks.
Search needs every word to match identifiers; the human preview needs to stay short and readable. Two outputs, two jobs.