From ec9d2245ffe7b61e6f47e61370bef3f41f294b27 Mon Sep 17 00:00:00 2001 From: Harish Krishna Date: Mon, 19 Jan 2015 13:50:39 -0500 Subject: [PATCH] coarse geocoder endpoint: using admin0, admin1, admin2 and neighborhood layers/datasets only --- app.js | 3 +++ helper/queryMixer.json | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/app.js b/app.js index e77bc3a2..c72dd515 100644 --- a/app.js +++ b/app.js @@ -37,6 +37,9 @@ app.get( '/suggest', sanitisers.suggest.middleware, controllers.suggest() ); app.get( '/suggest/nearby', sanitisers.suggest.middleware, controllers.suggest(undefined, undefined, require('./helper/queryMixer').suggest_nearby) ); +app.get( '/suggest/coarse', + sanitisers.suggest.middleware, + controllers.suggest(undefined, undefined, require('./helper/queryMixer').coarse) ); // search API app.get( '/search', sanitisers.search.middleware, controllers.search() ); diff --git a/helper/queryMixer.json b/helper/queryMixer.json index e3becfba..e3096bf8 100644 --- a/helper/queryMixer.json +++ b/helper/queryMixer.json @@ -24,5 +24,16 @@ "precision": [], "fuzzy": "AUTO" } + ], + "coarse": [ + { + "layers": ["admin0","admin1","admin2","neighborhood"], + "precision": [] + }, + { + "layers": ["admin0","admin1","admin2","neighborhood"], + "precision": [], + "fuzzy": "AUTO" + } ] } \ No newline at end of file