diff --git a/query/search.js b/query/search.js index bf95b76b..a3787535 100644 --- a/query/search.js +++ b/query/search.js @@ -85,9 +85,9 @@ function generateQuery( clean ){ check.number(clean['boundary.rect.min_lon']) && check.number(clean['boundary.rect.max_lon']) ){ vs.set({ - 'boundary:rect:top': clean['boundary.rect.min_lat'], + 'boundary:rect:top': clean['boundary.rect.max_lat'], 'boundary:rect:right': clean['boundary.rect.max_lon'], - 'boundary:rect:bottom': clean['boundary.rect.max_lat'], + 'boundary:rect:bottom': clean['boundary.rect.min_lat'], 'boundary:rect:left': clean['boundary.rect.min_lon'] }); } diff --git a/test/unit/fixture/search_linguistic_bbox.js b/test/unit/fixture/search_linguistic_bbox.js index 754421e0..6c98b010 100644 --- a/test/unit/fixture/search_linguistic_bbox.js +++ b/test/unit/fixture/search_linguistic_bbox.js @@ -73,9 +73,9 @@ module.exports = { 'must': [{ 'geo_bounding_box': { 'center_point': { - 'top': 47.47, + 'top': 11.51, 'right': -61.84, - 'bottom': 11.51, + 'bottom': 47.47, 'left': -103.16 }, '_cache': true, diff --git a/test/unit/fixture/search_linguistic_focus_bbox.js b/test/unit/fixture/search_linguistic_focus_bbox.js index 09262a0e..e6a04824 100644 --- a/test/unit/fixture/search_linguistic_focus_bbox.js +++ b/test/unit/fixture/search_linguistic_focus_bbox.js @@ -102,9 +102,9 @@ module.exports = { 'must': [{ 'geo_bounding_box': { 'center_point': { - 'top': 47.47, + 'top': 11.51, 'right': -61.84, - 'bottom': 11.51, + 'bottom': 47.47, 'left': -103.16 }, '_cache': true,