Skip to content

Commit

Permalink
feat(elasticsearch): do not reuse config for elasticsearch client
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Aug 15, 2019
1 parent 3827d31 commit 90f2da6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helper/type_mapping_discovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DISCOVERY_QUERY = {
};

module.exports = (tm, done) => {
const esclient = elasticsearch.Client(peliasConfig.esclient);
const esclient = elasticsearch.Client(_.extend({}, peliasConfig.esclient));
esclient.search(DISCOVERY_QUERY, (err, res) => {

// query error
Expand Down
2 changes: 1 addition & 1 deletion routes/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const Libpostal = require('../service/configurations/Libpostal');
* @param {object} peliasConfig
*/
function addRoutes(app, peliasConfig) {
const esclient = elasticsearch.Client(peliasConfig.esclient);
const esclient = elasticsearch.Client(_.extend({}, peliasConfig.esclient));

const pipConfiguration = new PointInPolygon(_.defaultTo(peliasConfig.api.services.pip, {}));
const pipService = serviceWrapper(pipConfiguration);
Expand Down

0 comments on commit 90f2da6

Please sign in to comment.