From db29e85a3c1e5909bde87e2195f07d3fd9af2a84 Mon Sep 17 00:00:00 2001 From: Harish Krishna Date: Mon, 13 Oct 2014 19:20:45 -0400 Subject: [PATCH] precision as an array [3,1] resulted in mostly precision:1 values. so, splitting it up --- controller/suggest.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/controller/suggest.js b/controller/suggest.js index 31ea58e1..645c0d73 100644 --- a/controller/suggest.js +++ b/controller/suggest.js @@ -60,13 +60,17 @@ function setup( backend, query ){ if (req.clean.input.length < 4) { async_query = { a: function(callback){ - cmd.body = query_admin( req.clean, [3,1] ); + cmd.body = query_admin( req.clean, 4 ); query_backend(cmd, callback); }, b: function(callback) { cmd.body = query_poi( req.clean ); query_backend(cmd, callback); - } + }, + c: function(callback){ + cmd.body = query_admin( req.clean ); + query_backend(cmd, callback); + }, } } else { async_query = { @@ -88,7 +92,7 @@ function setup( backend, query ){ async.parallel(async_query, function(err, results) { var splice_length = parseInt((req.clean.size / Object.keys(results).length), 10); - // results is equal to: {one: docs, two: docs, three: docs} + // results is equal to: {a: docs, b: docs, c: docs} var combined = []; for (keys in results) { combined = combined.concat(results[keys].splice(0,splice_length));