diff --git a/defaults.json b/defaults.json index 1505a18..214b035 100644 --- a/defaults.json +++ b/defaults.json @@ -11,8 +11,6 @@ "boundary:circle:radius": "50km", "boundary:circle:distance_type": "plane", - "boundary:rect:type": "indexed", - "ngram:analyzer": "peliasOneEdgeGram", "ngram:field": "name.default", "ngram:boost": 1, diff --git a/test/view/boundary_rect.js b/test/view/boundary_rect.js index dea69b3..798a1ab 100644 --- a/test/view/boundary_rect.js +++ b/test/view/boundary_rect.js @@ -7,7 +7,6 @@ function getBaseVariableStore(toExclude) { vs.var('boundary:rect:right', 'right value'); vs.var('boundary:rect:bottom', 'bottom value'); vs.var('boundary:rect:left', 'left value'); - vs.var('boundary:rect:type', 'type value'); vs.var('centroid:field', 'field value'); if (toExclude) { @@ -52,7 +51,6 @@ module.exports.tests.no_exceptions_conditions = function(test, common) { var expected = { geo_bounding_box: { - type: { $: 'type value' }, 'field value': { top: { $: 'top value' }, right: { $: 'right value' }, diff --git a/view/boundary_rect.js b/view/boundary_rect.js index d20d79d..0cea379 100644 --- a/view/boundary_rect.js +++ b/view/boundary_rect.js @@ -6,25 +6,21 @@ module.exports = function( vs ){ !vs.isset('boundary:rect:right') || !vs.isset('boundary:rect:bottom') || !vs.isset('boundary:rect:left') || - !vs.isset('boundary:rect:type') || !vs.isset('centroid:field') ){ return null; } - // base view + // base view with bbox var view = { geo_bounding_box: { - type: vs.var('boundary:rect:type') + [ vs.var('centroid:field') ]: { + top: vs.var('boundary:rect:top'), + right: vs.var('boundary:rect:right'), + bottom: vs.var('boundary:rect:bottom'), + left: vs.var('boundary:rect:left') + } } }; - // bbox - view.geo_bounding_box[ vs.var('centroid:field') ] = { - top: vs.var('boundary:rect:top'), - right: vs.var('boundary:rect:right'), - bottom: vs.var('boundary:rect:bottom'), - left: vs.var('boundary:rect:left') - }; - return view; };