From b408b96948d0b5e36ac34ef97ccc2c48a0ee6773 Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Tue, 11 Oct 2016 22:55:31 -0400 Subject: [PATCH 1/2] hardcode size to 100 for FallbackQuery --- query/search.js | 4 ++-- test/unit/fixture/search_boundary_country.js | 2 +- test/unit/fixture/search_linguistic_bbox.js | 2 +- test/unit/fixture/search_linguistic_focus.js | 2 +- test/unit/fixture/search_linguistic_focus_bbox.js | 2 +- test/unit/fixture/search_linguistic_focus_null_island.js | 2 +- test/unit/fixture/search_linguistic_only.js | 2 +- test/unit/fixture/search_linguistic_viewport.js | 2 +- test/unit/fixture/search_linguistic_viewport_min_diagonal.js | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/query/search.js b/query/search.js index 5f7f3e34..b16a01cd 100644 --- a/query/search.js +++ b/query/search.js @@ -59,7 +59,7 @@ function generateQuery( clean ){ // size if( clean.querySize ) { - vs.var( 'size', clean.querySize ); + vs.var( 'size', 100 ); } // focus point @@ -137,4 +137,4 @@ function hasStreet(vs) { return vs.isset('input:street'); } -module.exports = generateQuery; \ No newline at end of file +module.exports = generateQuery; diff --git a/test/unit/fixture/search_boundary_country.js b/test/unit/fixture/search_boundary_country.js index 96fb4170..2ae6d903 100644 --- a/test/unit/fixture/search_boundary_country.js +++ b/test/unit/fixture/search_boundary_country.js @@ -73,7 +73,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 10, + 'size': 100, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_bbox.js b/test/unit/fixture/search_linguistic_bbox.js index 46e2fccd..97614397 100644 --- a/test/unit/fixture/search_linguistic_bbox.js +++ b/test/unit/fixture/search_linguistic_bbox.js @@ -76,7 +76,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 10, + 'size': 100, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_focus.js b/test/unit/fixture/search_linguistic_focus.js index b2e577b1..07486bdd 100644 --- a/test/unit/fixture/search_linguistic_focus.js +++ b/test/unit/fixture/search_linguistic_focus.js @@ -79,7 +79,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 10, + 'size': 100, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_focus_bbox.js b/test/unit/fixture/search_linguistic_focus_bbox.js index 1f61dc6d..87299705 100644 --- a/test/unit/fixture/search_linguistic_focus_bbox.js +++ b/test/unit/fixture/search_linguistic_focus_bbox.js @@ -90,7 +90,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 10, + 'size': 100, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_focus_null_island.js b/test/unit/fixture/search_linguistic_focus_null_island.js index fc47bc4e..a6edfe02 100644 --- a/test/unit/fixture/search_linguistic_focus_null_island.js +++ b/test/unit/fixture/search_linguistic_focus_null_island.js @@ -79,7 +79,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 10, + 'size': 100, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_only.js b/test/unit/fixture/search_linguistic_only.js index caa4aefa..b227e0ed 100644 --- a/test/unit/fixture/search_linguistic_only.js +++ b/test/unit/fixture/search_linguistic_only.js @@ -65,7 +65,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 10, + 'size': 100, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_viewport.js b/test/unit/fixture/search_linguistic_viewport.js index caa4aefa..b227e0ed 100644 --- a/test/unit/fixture/search_linguistic_viewport.js +++ b/test/unit/fixture/search_linguistic_viewport.js @@ -65,7 +65,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 10, + 'size': 100, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_viewport_min_diagonal.js b/test/unit/fixture/search_linguistic_viewport_min_diagonal.js index caa4aefa..b227e0ed 100644 --- a/test/unit/fixture/search_linguistic_viewport_min_diagonal.js +++ b/test/unit/fixture/search_linguistic_viewport_min_diagonal.js @@ -65,7 +65,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 10, + 'size': 100, 'track_scores': true, 'sort': [ { From c7b07c271e90fe1549ae764115c5713dbcfb33b5 Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Wed, 12 Oct 2016 10:43:14 -0400 Subject: [PATCH 2/2] updated hardcoded ES query size to 50 --- query/search.js | 2 +- test/unit/fixture/search_boundary_country.js | 2 +- test/unit/fixture/search_linguistic_bbox.js | 2 +- test/unit/fixture/search_linguistic_focus.js | 2 +- test/unit/fixture/search_linguistic_focus_bbox.js | 2 +- test/unit/fixture/search_linguistic_focus_null_island.js | 2 +- test/unit/fixture/search_linguistic_only.js | 2 +- test/unit/fixture/search_linguistic_viewport.js | 2 +- test/unit/fixture/search_linguistic_viewport_min_diagonal.js | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/query/search.js b/query/search.js index b16a01cd..29dea8b9 100644 --- a/query/search.js +++ b/query/search.js @@ -59,7 +59,7 @@ function generateQuery( clean ){ // size if( clean.querySize ) { - vs.var( 'size', 100 ); + vs.var( 'size', 50 ); } // focus point diff --git a/test/unit/fixture/search_boundary_country.js b/test/unit/fixture/search_boundary_country.js index 2ae6d903..f622e1f5 100644 --- a/test/unit/fixture/search_boundary_country.js +++ b/test/unit/fixture/search_boundary_country.js @@ -73,7 +73,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 100, + 'size': 50, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_bbox.js b/test/unit/fixture/search_linguistic_bbox.js index 97614397..52c73c3c 100644 --- a/test/unit/fixture/search_linguistic_bbox.js +++ b/test/unit/fixture/search_linguistic_bbox.js @@ -76,7 +76,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 100, + 'size': 50, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_focus.js b/test/unit/fixture/search_linguistic_focus.js index 07486bdd..33c62c1e 100644 --- a/test/unit/fixture/search_linguistic_focus.js +++ b/test/unit/fixture/search_linguistic_focus.js @@ -79,7 +79,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 100, + 'size': 50, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_focus_bbox.js b/test/unit/fixture/search_linguistic_focus_bbox.js index 87299705..717c27ac 100644 --- a/test/unit/fixture/search_linguistic_focus_bbox.js +++ b/test/unit/fixture/search_linguistic_focus_bbox.js @@ -90,7 +90,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 100, + 'size': 50, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_focus_null_island.js b/test/unit/fixture/search_linguistic_focus_null_island.js index a6edfe02..20f72ceb 100644 --- a/test/unit/fixture/search_linguistic_focus_null_island.js +++ b/test/unit/fixture/search_linguistic_focus_null_island.js @@ -79,7 +79,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 100, + 'size': 50, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_only.js b/test/unit/fixture/search_linguistic_only.js index b227e0ed..8c377f71 100644 --- a/test/unit/fixture/search_linguistic_only.js +++ b/test/unit/fixture/search_linguistic_only.js @@ -65,7 +65,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 100, + 'size': 50, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_viewport.js b/test/unit/fixture/search_linguistic_viewport.js index b227e0ed..8c377f71 100644 --- a/test/unit/fixture/search_linguistic_viewport.js +++ b/test/unit/fixture/search_linguistic_viewport.js @@ -65,7 +65,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 100, + 'size': 50, 'track_scores': true, 'sort': [ { diff --git a/test/unit/fixture/search_linguistic_viewport_min_diagonal.js b/test/unit/fixture/search_linguistic_viewport_min_diagonal.js index b227e0ed..8c377f71 100644 --- a/test/unit/fixture/search_linguistic_viewport_min_diagonal.js +++ b/test/unit/fixture/search_linguistic_viewport_min_diagonal.js @@ -65,7 +65,7 @@ module.exports = { 'boost_mode': 'multiply' } }, - 'size': 100, + 'size': 50, 'track_scores': true, 'sort': [ {