|
|
@ -48,8 +48,9 @@ function setup( backend, query ){ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
function(err, results) { |
|
|
|
function(err, results) { |
|
|
|
// results is now equals to: {admin: docs, poi: docs, poi1: docs, poi3: docs}
|
|
|
|
var splice_length = req.clean.size / 3; |
|
|
|
var combined = results.poi.splice(0,3).concat(results.admin.splice(0,4)).concat(results.poi1.splice(0,4)); |
|
|
|
// results is now equals to: {admin: docs, poi: docs, poi1: docs}
|
|
|
|
|
|
|
|
var combined = results.poi.splice(0,splice_length).concat(results.admin.splice(0,splice_length)).concat(results.poi1.splice(0,splice_length)); |
|
|
|
|
|
|
|
|
|
|
|
//dedup
|
|
|
|
//dedup
|
|
|
|
var unique_ids = []; |
|
|
|
var unique_ids = []; |
|
|
|