AliasOperation

@Serializable(with = AliasOperationSerializer::class)
sealed interface AliasOperation

A single change applied by updateAliases. All operations in one call are applied atomically, which is what makes a zero-downtime reindex possible (build a new collection, then swap the alias).

Build these through the updateAliases { } DSL rather than constructing them directly.

Inheritors

Types

Link copied to clipboard
data class Create(val collectionName: String, val aliasName: String) : AliasOperation

Point aliasName at collectionName (creating the alias, or moving an existing one).

Link copied to clipboard
data class Delete(val aliasName: String) : AliasOperation

Remove aliasName if it exists.

Link copied to clipboard
data class Rename(val oldAliasName: String, val newAliasName: String) : AliasOperation

Atomically rename oldAliasName to newAliasName.