Content index backfill
Daily, fleet-wide and hash-gated: re-indexes every Space's content and every mail copy's attachments where the index lacks a file's current bytes, and retries every file recorded with an indexing gap. Run by the daily schedule as System; a global admin may run it by hand.
- Code: using System; using Microsoft.Extensions.DependencyInjection; using MeshWeaver.Messaging; using Microsoft.Extensions.Logging; // The fleet-wide, hash-gated content index backfill — Indexing/ContentIndexingCoverage, "Re-index and // backfill". It looks at every Space's `content` and every mail copy's `attachments`, and re-indexes a // collection only when the index does not serve some file's current bytes (never indexed, changed, or // recorded with a gap — which is retried here, once a day). A collection that is current opens nothing. // // Authorized as whoever runs it: the daily schedule (Admin/EventSubscription/content-index-backfill) // runs as System; a person must be a global admin. Executed as System. The work is compiled, tested // module code (ContentIndexBackfill.Run, registered under the key below), so this script stays one call. // Resolved by KEY, as a delegate of framework types: a script compiles against the portal image's // reference set, so it never names the module type (ContentIndexBackfill) itself. var run = Mesh.ServiceProvider.GetRequiredKeyedService<Func<IMessageHub, IObservable<string>>>("content-index-backfill"); var report = await run(Mesh) .ObserveCompletion( ex => Log.LogWarning(ex, "The content index backfill faulted after its wait settled."), cancelSource: true, Ct); var summary = report ?? "The content index backfill produced no report."; Console.WriteLine(summary);
- Is executable: yes
- Last executed at: 2026-11-07T02:00:00.4517046+00:00
- Last executed by: system-security
- Last executed code hash: 7SMnDO8sJKmyBEmx/0dfLB8r+yXphyqTpyRdxg7iCLc=
- Last activity path: Admin/_Activity/87b687c1b6424f9e8e08f297edf9de3a
- Activity parent path: Admin