Browse Source

adding type only if clean.layers are not undefined

pull/31/head
Harish Krishna 10 years ago
parent
commit
0a58bc9fea
  1. 6
      controller/search.js

6
controller/search.js

@ -12,10 +12,12 @@ function setup( backend, query ){
// backend command
var cmd = {
index: 'pelias',
body: query( req.clean ),
type: req.clean.layers
body: query( req.clean )
};
if (req.clean.layers) {
cmd.type = req.clean.layers;
}
// query backend
backend().client.search( cmd, function( err, data ){

Loading…
Cancel
Save