diff --git a/query/defaults.js b/query/defaults.js index b8ce5ad1..b61e84ac 100644 --- a/query/defaults.js +++ b/query/defaults.js @@ -83,13 +83,13 @@ module.exports = extend( false, peliasQuery.defaults, { 'admin:neighborhood:boost': 1, 'popularity:field': 'popularity', - 'popularity:modifier': 'sqrt', - 'popularity:max_boost': 10000, + 'popularity:modifier': 'log1p', + 'popularity:max_boost': 20, 'popularity:weight': 1, 'population:field': 'population', - 'population:modifier': 'sqrt', - 'population:max_boost': 2000, + 'population:modifier': 'log1p', + 'population:max_boost': 20, 'population:weight': 2 }); diff --git a/test/unit/fixture/autocomplete_linguistic_focus.js b/test/unit/fixture/autocomplete_linguistic_focus.js index 78f42c7f..8d0e9914 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus.js +++ b/test/unit/fixture/autocomplete_linguistic_focus.js @@ -64,7 +64,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -74,7 +74,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -93,7 +93,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -103,7 +103,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js index c12995f2..8300b026 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js +++ b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js @@ -64,7 +64,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -74,7 +74,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -93,7 +93,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -103,7 +103,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/autocomplete_linguistic_only.js b/test/unit/fixture/autocomplete_linguistic_only.js index e60d84d9..53ece28e 100644 --- a/test/unit/fixture/autocomplete_linguistic_only.js +++ b/test/unit/fixture/autocomplete_linguistic_only.js @@ -36,7 +36,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -46,7 +46,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -65,7 +65,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -75,7 +75,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_boundary_country.js b/test/unit/fixture/search_boundary_country.js index ffa6e6bd..3e6f83bc 100644 --- a/test/unit/fixture/search_boundary_country.js +++ b/test/unit/fixture/search_boundary_country.js @@ -46,7 +46,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -56,7 +56,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -75,7 +75,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -85,7 +85,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_full_address.js b/test/unit/fixture/search_full_address.js index 205576bc..93572705 100644 --- a/test/unit/fixture/search_full_address.js +++ b/test/unit/fixture/search_full_address.js @@ -40,7 +40,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -50,7 +50,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -69,7 +69,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -79,7 +79,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_linguistic_bbox.js b/test/unit/fixture/search_linguistic_bbox.js index 8b102f9b..6e6676d5 100644 --- a/test/unit/fixture/search_linguistic_bbox.js +++ b/test/unit/fixture/search_linguistic_bbox.js @@ -36,7 +36,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -46,7 +46,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -65,7 +65,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -75,7 +75,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_linguistic_focus.js b/test/unit/fixture/search_linguistic_focus.js index 59227c5c..36cb2912 100644 --- a/test/unit/fixture/search_linguistic_focus.js +++ b/test/unit/fixture/search_linguistic_focus.js @@ -66,7 +66,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -76,7 +76,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -95,7 +95,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -105,7 +105,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_linguistic_focus_bbox.js b/test/unit/fixture/search_linguistic_focus_bbox.js index 4c2fadb9..4932d56b 100644 --- a/test/unit/fixture/search_linguistic_focus_bbox.js +++ b/test/unit/fixture/search_linguistic_focus_bbox.js @@ -66,7 +66,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -76,7 +76,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -95,7 +95,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -105,7 +105,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_linguistic_focus_null_island.js b/test/unit/fixture/search_linguistic_focus_null_island.js index 4290cfed..04116c55 100644 --- a/test/unit/fixture/search_linguistic_focus_null_island.js +++ b/test/unit/fixture/search_linguistic_focus_null_island.js @@ -66,7 +66,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -76,7 +76,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -95,7 +95,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -105,7 +105,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_linguistic_only.js b/test/unit/fixture/search_linguistic_only.js index e60d84d9..53ece28e 100644 --- a/test/unit/fixture/search_linguistic_only.js +++ b/test/unit/fixture/search_linguistic_only.js @@ -36,7 +36,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -46,7 +46,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -65,7 +65,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -75,7 +75,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_partial_address.js b/test/unit/fixture/search_partial_address.js index 72ef8c02..6e0fbd5b 100644 --- a/test/unit/fixture/search_partial_address.js +++ b/test/unit/fixture/search_partial_address.js @@ -39,7 +39,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -49,7 +49,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -68,7 +68,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -78,7 +78,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2 diff --git a/test/unit/fixture/search_regions_address.js b/test/unit/fixture/search_regions_address.js index 047a2ffe..cc04943b 100644 --- a/test/unit/fixture/search_regions_address.js +++ b/test/unit/fixture/search_regions_address.js @@ -39,7 +39,7 @@ module.exports = { } } }, - 'max_boost': 10000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -49,7 +49,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'popularity' }, 'weight': 1 @@ -68,7 +68,7 @@ module.exports = { } } }, - 'max_boost': 2000, + 'max_boost': 20, 'score_mode': 'first', 'boost_mode': 'replace', 'filter': { @@ -78,7 +78,7 @@ module.exports = { }, 'functions': [{ 'field_value_factor': { - 'modifier': 'sqrt', + 'modifier': 'log1p', 'field': 'population' }, 'weight': 2