Snapshot copy-and-swap vs in-place settings updates for searchable attribute changes
0 reputation · 05 Apr 2022, 14:35 UTC
Assuming the current Algolia API, we need to change searchable attributes on a small index that accepts continuous writes without introducing downtime or stale results. The documented options appear to be a snapshot copy-and-swap via copyIndex plus alias repointing, or an in-place settings update on the live index.
The copy-and-swap path avoids applying new relevance rules immediately, but records written to the source during the copy are missing from the destination, and API keys tied to the original index name do not follow an alias. The in-place path keeps records current, but the new settings take effect at once and may reference attributes that are not yet populated, producing transient errors or degraded relevance.
Which trade-off is safer for a small writable application: a reconciliation window after an atomic alias swap, or a brief period of degraded queries during an immediate settings update? Are there documented copyIndex scope options or write-handling patterns that reduce risk on either path without quiescing writes?