Configuration

edit

The Client constructor accepts a single object as its argument. In the Config options section all of the available options/keys are listed.

var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
  ... config options ...
});

Due to the complex nature of the configuration, the config object you pass in will be modified and can only be used to create one Client instance. Sorry for the inconvenience. Related Github issue: https://github.com/elasticsearch/elasticsearch-js/issues/33