Aliases
Learn how to create and manage index aliases with CBElasticsearch
getWireBox().getInstance( "AliasBuilder@cbElasticSearch" )
.add( indexName = "myIndex", aliasName = "newAlias" )
.save();getWireBox().getInstance( "AliasBuilder@cbElasticSearch" )
.remove( indexName = "otherIndex", aliasName = "randomAlias" )
.save();var removeAliasAction = getWireBox().getInstance( "AliasBuilder@cbElasticSearch" )
.remove( indexName = "testIndexName", aliasName = "aliasNameOne" );
var addNewAliasAction = getWireBox().getInstance( "AliasBuilder@cbElasticSearch" )
.add( indexName = "testIndexName", aliasName = "aliasNameTwo" );
variables.client.applyAliases(
// a single alias action can also be provided
aliases = [ removeAliasAction, addNewAliasAction ]
);Retrieving Aliases
Last updated
Was this helpful?