diff --git a/controller/search.js b/controller/search.js index b5657a7f6..3dbff74e7 100644 --- a/controller/search.js +++ b/controller/search.js @@ -152,7 +152,7 @@ function setup( peliasConfig, esclient, query, should_execute ){ } logger.debug('[ES response]', docs); if (req.clean.enableElasticDebug) { - debugLog.push(req, {ES_response: {docs, meta, data}}); + debugLog.push(req, { ES_response: _.cloneDeep({ docs, meta, data }) }); } next(); });