What this thread does
Do first: create the destination index with explicit mappings and settings, then choose a writer pause or durable change-replay boundary before POST /_reindex.
Short answer
As of November 2026, this card uses current Elasticsearch docs for ordinary index aliases. Reindex is a copy. Keep the live alias on the source until copying and reconciliation finish, then remove/add it in one guarded request. Retaining the old index permits recovery only if post-cutover changes can also be reconciled.
Choose / don't choose
- Pause writers: choose when a maintenance interval is acceptable; don't resume before alias state is confirmed.
- Durable replay: choose when updates/deletes must continue; don't rely on a second blind copy to reproduce deletions or resolve stale overwrites. Sandeep's February 3, 2018 report and Mark Walkom's reply establish the source-view gap.
- Alias swap: the request swaps the index for the alias; choose for routing; don't treat it as transformation or replication of application state (aliases).
Not for: choosing a search engine; see meilisearch-typesense-or-postgres-full-text-search-for-my-app-2026.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
wait_for_completion | false returns task ID; default true waits; neither permits early cutover | Current Elasticsearch docs, November 2026 | reindex |
is_write_index | Specify the alias write index or data stream; retain at most one write target for the alias | Current Elasticsearch docs, November 2026 | aliases |
must_exist | true requires the alias to exist to perform the action; default false | Current Elasticsearch docs, November 2026 | alias API |
conflicts | Default abort; proceed counts conflicts but does not excuse other failures | Current Elasticsearch docs, November 2026 | reindex |
mappings / settings | Set destination field types/analyzers, shards and replicas before copy | Current Elasticsearch docs, November 2026 | create index |
Order of operations
1. Save source mappings, alias filters/routing and membership. Create a separate destination; reindex does not copy its mappings or settings. Require available source _source (reindex). 2. Pause and drain writers before copying, or establish durable ordered capture before the source view is taken. Copy into the destination while keeping applications on the old alias. Poll GET /_tasks/<task_id> to terminal completion; a returned task ID means only submission (task API). 3. Gate cutover on no task error, timed_out: false, empty failures and explicitly reconciled version_conflicts. Partial writes survive a failed copy; do not assume automatic undo. Compare document identities, counts and representative transformed queries, then replay captured creates/updates/deletes through a known high-water mark. Briefly pause writers for final reconciliation. 4. For illustrative names old-index, new-index, live, perform one request and preserve original alias filters/routing if present:
POST /_aliases
{"actions":[
{"remove":{"index":"old-index","alias":"live","must_exist":true}},
{"add":{"index":"new-index","alias":"live","is_write_index":true}}
]}
The alias guide warns that an unguarded list may partially succeed. Inspect errors/action_results and read membership after any timeout before retrying; acknowledgment alone is insufficient for a partial-action response (API). 5. Resume writers only after routing is confirmed. Keep the old index through the recovery window. To reverse, pause writers, reconcile new writes/deletes back into an old-schema-compatible source, then use the inverse guarded remove/add request. Never use remove_index as the cutover removal: that deletes the index.
Known failures and fixes
| Error (short quote) | Cause | Fix | Source |
|---|---|---|---|
document_missing_exception | reindex an index that is being actively modified | Wait for completion and reconcile writes before switching | Popisana Ograda, October 29, 2024 |
aliases_not_found_exception | An alias is missing | Read actual membership; require must_exist:true and correct the guarded request | alias example |
Recovery limits
- The linked report describes missing-document errors after the alias switched to the new index.
- Reindex is not continuous replication.
- Replay source, ordering/version policy and reverse transformation are application decisions. Without a durable change stream or writer pause, this card cannot promise lossless live migration or rollback.
Started from a post by @Elastic, packaged by the editor. Original post