Elastic.getAlias()

Get elastic alias and see the pointed index

Usage

Hover over inputs/exits for more info.

var Elastic = require('machines-elastic');


// Get elastic alias and see the pointed index

Elastic.getAlias({

hostname: 'localhost',

name: 'alias',

port: 9200,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Could not connect to ElasticSearch at the provided hostname and port.

couldNotConnect: function () {

 

},

// The given alias does not exists.

aliasNotExists: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

hostname required

The hostname of your ElasticSearch server

'localhost'
name required

The alias name

'alias'
port

The port your ElasticSearch server is running on

9200

Exits

error

An unexpected error occurred.

couldNotConnect

Could not connect to ElasticSearch at the provided hostname and port.

aliasNotExists

The given alias does not exists.

success

OK.

'index_1'