IMPORTANT: elasticsearch.js has been replaced by the new Elasticsearch JavaScript client. We strongly advise you to migrate to the new client. To learn more, see the migration guide.
Configuration
editConfiguration
editThe 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