From a67f640acbea49ef3a920207515449e53d957ba8 Mon Sep 17 00:00:00 2001 From: Harish Krishna Date: Tue, 20 Jan 2015 17:28:02 -0500 Subject: [PATCH] adding address type to layers by default --- helper/queryMixer.json | 8 ++++---- sanitiser/_layers.js | 3 +-- test/unit/sanitiser/suggest.js | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helper/queryMixer.json b/helper/queryMixer.json index 4e2eb696..4d8ea590 100644 --- a/helper/queryMixer.json +++ b/helper/queryMixer.json @@ -1,7 +1,7 @@ { "suggest": [ { - "layers": ["poi", "admin"], + "layers": ["poi", "admin", "address"], "precision": [5, 3, 1] }, { @@ -9,18 +9,18 @@ "precision": [] }, { - "layers": ["poi", "admin"], + "layers": ["poi", "admin", "address"], "precision": [3], "fuzzy": "AUTO" } ], "suggest_nearby": [ { - "layers": ["poi", "admin"], + "layers": ["poi", "admin", "address"], "precision": [] }, { - "layers": ["poi", "admin"], + "layers": ["poi", "admin", "address"], "precision": [], "fuzzy": "AUTO" } diff --git a/sanitiser/_layers.js b/sanitiser/_layers.js index 87fd6b07..24c4b478 100644 --- a/sanitiser/_layers.js +++ b/sanitiser/_layers.js @@ -16,8 +16,7 @@ function sanitize( req ){ // default case (no layers specified in GET params) if('string' !== typeof params.layers || !params.layers.length){ - // @note: 'address' alias disabled by default until feature testing completed - params.layers = 'poi,admin'; // default layers + params.layers = 'poi,admin,address'; // default layers } // decide which layers can be queried diff --git a/test/unit/sanitiser/suggest.js b/test/unit/sanitiser/suggest.js index b213e06f..dc68a6c0 100644 --- a/test/unit/sanitiser/suggest.js +++ b/test/unit/sanitiser/suggest.js @@ -5,7 +5,8 @@ var suggest = require('../../../sanitiser/suggest'), defaultError = 'invalid param \'input\': text length, must be >0', defaultClean = { input: 'test', lat: 0, - layers: [ 'geoname', 'osmnode', 'osmway', 'admin0', 'admin1', 'admin2', 'neighborhood' ], + layers: [ 'geoname', 'osmnode', 'osmway', 'admin0', 'admin1', 'admin2', 'neighborhood', + 'osmaddress', 'openaddresses' ], lon: 0, size: 10, zoom: 10