Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Merge branch 'feature/partner-full-text-search-rollout' into feature/partner-full-text-search-sync

Rafif77bf2c3125f
diff --cc apps/web/scripts/partners/backfill-partner-search.ts
index ea3c1de590,3e75df3d62..2674e8331a
--- a/apps/web/scripts/partners/backfill-partner-search.ts
+++ b/apps/web/scripts/partners/backfill-partner-search.ts
@@@ -1,17 -1,12 +1,17 @@@
/**
- * Indexes a program's partner enrollments into the configured search provider.
+ * Indexes partner enrollments into the configured search provider.
*
- * Pages by enrollment ID rather than offset, so per-batch cost stays flat across
- * a 100K-partner program. A failed run prints the command to resume from the
- * last indexed document, so a partial backfill is never redone from zero.
+ * Runs one program or every program. Pages by enrollment ID rather than offset,
+ * so per-batch cost stays flat across a 100K-partner program, and iterates
+ * programs in ID order so a resumed run picks up exactly where it stopped.
+ *
+ * Programs are the outer loop rather than one cursor over the whole table. A
+ * single global cursor would be simpler, but it leaves every program partially
+ * indexed until the entire run finishes, so no program is ever in a state worth
+ * trusting. Per-program means each finished program is genuinely done.
*
* The backfill only upserts. Documents whose enrollment was deleted are removed
- * by rebuilding the index wholesale, not incrementally: delete it and backfill
+ * by rebuilding the index wholesale, not incrementally. Delete it and backfill
* again.
*
* cd apps/web