Commit e6bc621
committed
feat(search): score the curated description and keywords front matter
The corpus is built from the markdown mirrors, and the mirrors carry `# Title` plus a
Source/Published/Author block and nothing else — front matter is not in them by design. So
the two most deliberately curated relevance signals on this site were absent from its own
search: `description` was ignored in favour of each page's first paragraph, and `keywords`
was unused entirely. 186 curated phrases across 29 posts, 140 of which appear nowhere in
the indexed text.
The consequence, measured as the rank of the page each phrase was WRITTEN for:
handle traffic spikes microservices absent of 32 -> #1
nodejs backpressure microservices absent of 32 -> #5
overload resilience absent -> #1
message queue throughput #32 of 134 -> #3
nodejs job queue #36 of 93 -> #3
imqueue benchmark #2 of 140 -> #1
Weighted at 300 — BELOW emphasis — and scored on coverage alone: no density, no position,
no phrase bonus. A keyword list is a handful of comma-separated phrases, so
occurrences-per-token sits near 1.0 for anything that matches at all, and density would
rank by brevity while rewarding padding; order in a comma list means nothing, so position
would be noise.
That placement is the point rather than caution for its own sake. Google has ignored
<meta name="keywords"> since 2009 and Bing treats a stuffed one as a spam signal — because
neither can trust the author. A first-party index can: the author is the site. What does
not change is that a self-declared list is cheap to pad, so it sits under the signals that
cost something to fake, and check:search-ranking asserts "safeDelivery" still ranks the
symbol first — the failure mode meta keywords earned its reputation for is an identifier
query returning articles that merely list the identifier.
Plumbed through a build intermediate: src/search-frontmatter.11ty.js emits url ->
{description, keywords} and the generator reads it and DELETES it, so it never ships. A
template rather than a front-matter parse because mapping a source file back to its URL
means re-deriving permalink resolution, which Eleventy owns and which this repo has already
been bitten by duplicating; `item.url` cannot drift from what Eleventy published. Keyword
text also feeds the vocabulary, so inflections in a keyword list get lemmas like any other
word.
Tier 1 grows 65.2 -> 67.5 KB gz on org, 0.9 -> 1.1 on com.
One defect worth recording: the new record was first named `entry`, inside a loop whose
variable is the directory entry. Shadowing it in the same block is a temporal-dead-zone
error reported at the line ABOVE, which reads as readdir having failed.1 parent f075504 commit e6bc621
4 files changed
Lines changed: 207 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
325 | 364 | | |
326 | 365 | | |
327 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
392 | 402 | | |
393 | 403 | | |
394 | 404 | | |
| |||
403 | 413 | | |
404 | 414 | | |
405 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
406 | 439 | | |
407 | 440 | | |
408 | 441 | | |
409 | 442 | | |
410 | 443 | | |
411 | 444 | | |
412 | 445 | | |
| 446 | + | |
| 447 | + | |
413 | 448 | | |
414 | 449 | | |
415 | 450 | | |
| |||
442 | 477 | | |
443 | 478 | | |
444 | 479 | | |
445 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
446 | 485 | | |
447 | 486 | | |
448 | 487 | | |
449 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
450 | 492 | | |
451 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
452 | 504 | | |
453 | 505 | | |
454 | 506 | | |
455 | 507 | | |
456 | 508 | | |
457 | 509 | | |
458 | 510 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 511 | + | |
464 | 512 | | |
465 | 513 | | |
466 | 514 | | |
| |||
506 | 554 | | |
507 | 555 | | |
508 | 556 | | |
| 557 | + | |
509 | 558 | | |
510 | 559 | | |
511 | 560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
641 | 648 | | |
642 | 649 | | |
643 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
644 | 681 | | |
645 | 682 | | |
646 | 683 | | |
| |||
658 | 695 | | |
659 | 696 | | |
660 | 697 | | |
661 | | - | |
| 698 | + | |
| 699 | + | |
662 | 700 | | |
663 | 701 | | |
664 | 702 | | |
| |||
671 | 709 | | |
672 | 710 | | |
673 | 711 | | |
674 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
675 | 715 | | |
676 | 716 | | |
677 | 717 | | |
| |||
770 | 810 | | |
771 | 811 | | |
772 | 812 | | |
| 813 | + | |
773 | 814 | | |
774 | 815 | | |
775 | 816 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments