Re-indexing must preserve source permissions throughout the transition. A new index that contains accurate text but incomplete access metadata can expose documents even when the previous version was correctly scoped.
Index replacement is a security transition
Re-indexing builds or updates derived search data. Content, permissions, source versions, and deletion state can change while the build runs. The release needs a defined consistency and activation boundary.
For a proposed rebuild plan, record the source snapshot, permission snapshot or live-check strategy, ingestion version, and activation conditions. Prevent incomplete protected resources from becoming broadly eligible because access fields are temporarily absent.
Do not assume an atomic index switch solves every problem. Revocations occurring during the build can still be missing from the new snapshot unless the design reconciles or rechecks them.
Rehearse a fictional build-time revocation
A restricted document is included early in a full rebuild. Before activation, one employee loses access. The new index should apply the current supported permission policy rather than restoring the older scope when it becomes live.
Another fixture imports the content successfully but fails to retrieve its permission metadata. The resource must follow the explicit safe failure policy, not default to public because the field is empty.
| Re-index fixture | Required invariant |
|---|---|
| Permissions unchanged | Allowed and denied cases preserved |
| Revocation during build | New activation does not restore stale access |
| Missing access metadata | Defined safe disposition |
| Deleted source during build | No unintended resurrection |
| Partial activation failure | Supported index remains consistent or safely contained |
Run identical fictional identity queries against old, staging, and activated indexes. Inspect assembled context, suggestions, and previews, not only candidate counts.
Include rollback and cleanup
If the new index is rejected, retaining the old one may preserve availability but also preserve stale content or permissions. Define how urgent revocations reach any fallback. Remove obsolete indexes and exports under the approved storage policy.
Stronger consistency checks can extend rebuild time. Faster activation can increase stale-scope risk. Choose and document the actual guarantee, then test the relevant races instead of presenting re-indexing as a purely relevance-oriented operation.
This rebuild design is proposed. The voice integration case study describes related backend and retrieval work. Pair it with incremental versus full indexing.
Re-index permission FAQ
Can missing permission metadata mean public access?
Only if an explicit approved source policy establishes that meaning, not as an accidental default.
Does an index swap guarantee current permissions?
No. Account for changes during the build and the supported live-check strategy.
What should block activation?
Use predefined access invariants, source-state checks, and safe recovery conditions for the actual deployment.