|
|
@ -1,4 +1,5 @@ |
|
|
|
var service = { mget: require('../service/mget') }; |
|
|
|
var service = { mget: require('../service/mget') }; |
|
|
|
|
|
|
|
var logger = require('pelias-logger').get('api:controller:place'); |
|
|
|
|
|
|
|
|
|
|
|
function setup( backend ){ |
|
|
|
function setup( backend ){ |
|
|
|
|
|
|
|
|
|
|
@ -46,6 +47,8 @@ function setup( backend ){ |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger.debug( '[ES req]', JSON.stringify(query) ); |
|
|
|
|
|
|
|
|
|
|
|
service.mget( backend, query, function( err, docs ) { |
|
|
|
service.mget( backend, query, function( err, docs ) { |
|
|
|
|
|
|
|
|
|
|
|
// error handler
|
|
|
|
// error handler
|
|
|
@ -56,6 +59,7 @@ function setup( backend ){ |
|
|
|
else { |
|
|
|
else { |
|
|
|
res.data = docs; |
|
|
|
res.data = docs; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
logger.debug('[ES response]', JSON.stringify(docs)); |
|
|
|
|
|
|
|
|
|
|
|
next(); |
|
|
|
next(); |
|
|
|
}); |
|
|
|
}); |
|
|
|