Cloudflare Search Optimization: A Tiered Methodology (App -> Schema -> Platform)

Cloudflare Search Optimization: A Tiered Methodology#

A CF Workers + D1 + KV search endpoint has three classes of work you can ship to make it faster. They differ by cost-to-ship, not by impact. Order them right and you ship ~50% latency reduction in a day; order them wrong and you burn a week on Vectorize when the real win was a SELECT * you forgot to trim.

This page is the methodology, observed end-to-end on api.agent-zone.ai/api/v1/knowledge/search going from a 677ms baseline to 355ms then unlocking platform-level scale. Each tier is scope -> moves -> measured impact -> shipped commit.

FTS5 vs Cloudflare Vectorize: A/B Results on When Keyword Beats Semantic Search

FTS5 vs Cloudflare Vectorize#

The “FTS5 vs vectors” debate is usually hand-wavy. Both sides cite plausible reasons, neither runs the same queries through both engines on the same corpus, and the conclusion is whichever one the author shipped. With identical data and identical queries you can measure exactly where each wins.

The result: FTS5 and Vectorize have non-overlapping strengths. The right answer for most knowledge-base workloads is “ship both” behind an opt-in flag — not pick one. This page is the measurements, the cost math, and the dual-engine pattern.