diff --git a/helper/geojsonify.js b/helper/geojsonify.js index 2dd81ea2..bd78b1f0 100644 --- a/helper/geojsonify.js +++ b/helper/geojsonify.js @@ -73,6 +73,11 @@ function search( docs ){ if( doc.admin1 ){ output.admin1 = doc.admin1; } if( doc.admin2 ){ output.admin2 = doc.admin2; } + // map suggest output + if( doc.suggest && doc.suggest.output ){ + output.text = doc.suggest.output; + } + return output; // filter-out invalid entries diff --git a/test/unit/helper/geojsonify.js b/test/unit/helper/geojsonify.js index 3e802837..e74e4b4d 100644 --- a/test/unit/helper/geojsonify.js +++ b/test/unit/helper/geojsonify.js @@ -140,6 +140,7 @@ module.exports.tests.search = function(test, common) { ] }, "properties": { + "text": "'Round Midnight Jazz and Blues Bar, Angel, United Kingdom", "name": "'Round Midnight Jazz and Blues Bar", "admin0": "United Kingdom", "admin1": "Islington", @@ -156,6 +157,7 @@ module.exports.tests.search = function(test, common) { ] }, "properties": { + "text": "Blues Cafe, Smithfield, United Kingdom", "name": "Blues Cafe", "admin0": "United Kingdom", "admin1": "City And County Of The City Of London",