Repair the search index on its schedules
What It Does
Search maintenance runs target resubmission every fifteen minutes, distributed nightly reconciliation and daily tombstone cleanup.
The Flow
Request rebuilds for unsatisfied targets or outdated provider settings, respecting per-type backoff. Compare source records, claims and provider documents, reindex drift and remove unsupported documents within the work budget. Inspect deletion claims older than fourteen days, remove remaining provider documents first and then retire eligible counters.
When Something Fails
A later pass retries incomplete resubmission. The scope can remain behind its desired configuration. Incomplete repair carries into later scheduled coverage rather than proving a clean scope. Residual drift can remain visible between passes. Missing credentials block work; budget exhaustion leaves additional work for another pass. Old claims remain longer until cleanup succeeds.
Idempotency and Concurrency
Bounded passes join existing rebuilds, use versioned repair writes and recheck tombstone cutoffs. Repeated passes still perform inspection work. The maintenance function reserves one invocation. Scope reconciliation defers when its target generation is ahead of the active ledger value.