Snap.Indexes.hotswap

You're seeing just the function hotswap, go back to Snap.Indexes module for more information.
Link to this function

hotswap(stream, cluster, alias, mapping, opts \\ [])

View Source

Specs

hotswap(Enumerable.t(), module(), String.t(), map(), Keyword.t()) ::
  :ok | Snap.Cluster.error() | {:error, Snap.BulkError.t()}

Creates and loads a new index, switching the alias to it with zero-downtime.

Takes an Enumerable of Snap.Bulk actions, and builds a new index from it. Refreshes it, updates the alias to it, and cleans up the old indexes, leaving the previous one behind.

May return Snap.Cluster.error/0 or a Snap.BulkError containing a list of failed bulk actions.