diff --git a/routes/v1.js b/routes/v1.js index 97bf7849..3b8a22dc 100644 --- a/routes/v1.js +++ b/routes/v1.js @@ -1,4 +1,5 @@ var Router = require('express').Router; +var elasticsearch = require('elasticsearch'); /** ----------------------- sanitizers ----------------------- **/ var sanitizers = { @@ -60,7 +61,7 @@ var postProc = { * @param {object} peliasConfig */ function addRoutes(app, peliasConfig) { - const esclient = require('elasticsearch').Client(peliasConfig.esclient); + const esclient = elasticsearch.Client(peliasConfig.esclient); var base = '/v1/';