feat(scripts): add OpenSearch backfill task

Iterates distinct DIDs in SQLite, resolves each one's PDS, and reindexes
every space.remanso.note record into OpenSearch via
com.atproto.repo.listRecords. Needed because note content is not
persisted to SQLite, so the index would otherwise only cover notes
created after deployment.
This commit is contained in:
Julien Calixte
2026-06-07 11:26:20 +02:00
parent e7796b47c3
commit d7e189c61f
2 changed files with 127 additions and 1 deletions

View File

@@ -6,7 +6,8 @@
"server:prod": "deno run --allow-net --allow-read --allow-write --allow-env --allow-ffi --unstable-ffi server.ts",
"migrate": "deno run --allow-net --allow-read --allow-write --allow-env --allow-ffi --unstable-ffi src/migrations/init.ts",
"webhooks": "deno run --allow-net --allow-env scripts/manage-webhooks.ts",
"webhooks:all": "deno run --allow-net --allow-env scripts/list-all-webhooks.ts"
"webhooks:all": "deno run --allow-net --allow-env scripts/list-all-webhooks.ts",
"backfill:search": "deno run --allow-net --allow-read --allow-write --allow-env --allow-ffi --unstable-ffi scripts/backfill-opensearch.ts"
},
"imports": {
"@db/sqlite": "jsr:@db/sqlite@^0.13.0",