Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion query/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ query.score( peliasQuery.view.admin('neighbourhood') );
query.score( views.boost_exact_matches );
query.score( peliasQuery.view.focus( views.ngrams_strict ) );
query.score( peliasQuery.view.popularity( views.pop_subquery ) );
query.score( peliasQuery.view.population( views.pop_subquery ) );
query.score( views.custom_boosts( config.get('api.customBoosts') ) );

// non-scoring hard filters
Expand Down
5 changes: 0 additions & 5 deletions query/autocomplete_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ module.exports = _.merge({}, peliasQuery.defaults, {
'popularity:max_boost': 20,
'popularity:weight': 1,

'population:field': 'population',
'population:modifier': 'log1p',
'population:max_boost': 20,
'population:weight': 3,

// boost_sources_and_layers view
'custom:boosting:min_score': 1, // score applied to documents which don't score anything via functions
'custom:boosting:boost': 5, // multiply score by this number to increase the strength of the boost
Expand Down
7 changes: 1 addition & 6 deletions query/reverse_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ module.exports = _.merge({}, peliasQuery.defaults, {
'popularity:field': 'popularity',
'popularity:modifier': 'log1p',
'popularity:max_boost': 20,
'popularity:weight': 1,

'population:field': 'population',
'population:modifier': 'log1p',
'population:max_boost': 20,
'population:weight': 2
'popularity:weight': 1

});
1 change: 0 additions & 1 deletion query/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ var fallbackQuery = new peliasQuery.layout.FallbackQuery();
// scoring boost
fallbackQuery.score( peliasQuery.view.focus_only_function( peliasQuery.view.phrase ) );
fallbackQuery.score( peliasQuery.view.popularity_only_function );
fallbackQuery.score( peliasQuery.view.population_only_function );
// --------------------------------

// non-scoring hard filters
Expand Down
5 changes: 0 additions & 5 deletions query/search_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ module.exports = _.merge({}, peliasQuery.defaults, {
'popularity:max_boost': 20,
'popularity:weight': 1,

'population:field': 'population',
'population:modifier': 'log1p',
'population:max_boost': 20,
'population:weight': 2,

// used by fallback queries
// @todo: it is also possible to specify layer boosting
// via pelias/config, consider deprecating this config.
Expand Down
1 change: 0 additions & 1 deletion query/search_original.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ query.score( peliasQuery.view.ngrams, 'must' );
query.score( peliasQuery.view.phrase );
query.score( peliasQuery.view.focus( peliasQuery.view.phrase ) );
query.score( peliasQuery.view.popularity( peliasQuery.view.phrase ) );
query.score( peliasQuery.view.population( peliasQuery.view.phrase ) );

// address components
query.score( peliasQuery.view.address('housenumber') );
Expand Down
1 change: 0 additions & 1 deletion query/structured_geocoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const structuredQuery = new peliasQuery.layout.StructuredFallbackQuery();
// scoring boost
structuredQuery.score( peliasQuery.view.focus_only_function( peliasQuery.view.phrase ) );
structuredQuery.score( peliasQuery.view.popularity_only_function );
structuredQuery.score( peliasQuery.view.population_only_function );
// --------------------------------

// non-scoring hard filters
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_boundary_country.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}],
'filter': [{
'match': {
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_boundary_gid.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}],
'filter': [{
'multi_match': {
Expand Down
20 changes: 0 additions & 20 deletions test/unit/fixture/autocomplete_custom_boosts.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,6 @@
"score_mode": "first",
"boost_mode": "replace"
}
},
{
"function_score": {
"query": {
"match_all": {}
},
"max_boost": 20,
"functions": [
{
"field_value_factor": {
"modifier": "log1p",
"field": "population",
"missing": 1
},
"weight": 3
}
],
"score_mode": "first",
"boost_mode": "replace"
}
},{
"function_score": {
"query": {
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}],
'filter': [{
'geo_bounding_box': {
Expand Down
22 changes: 0 additions & 22 deletions test/unit/fixture/autocomplete_linguistic_circle_san_francisco.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,6 @@ module.exports = {
'score_mode': 'first',
'boost_mode': 'replace'
}
},
{
'function_score': {
'query': {
'match_all': {

}
},
'max_boost': 20,
'functions': [
{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}
],
'score_mode': 'first',
'boost_mode': 'replace'
}
}
],
'filter': [
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_final_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}]
}
},
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}]
}
},
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_focus_null_island.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}]
}
},
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_multiple_tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}]
}
},
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_one_char_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}],
'filter': [{
'terms': {
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_only.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}]
}
},
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_three_char_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}]
}
},
Expand Down
17 changes: 0 additions & 17 deletions test/unit/fixture/autocomplete_linguistic_two_char_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ module.exports = {
'weight': 1
}]
}
},{
'function_score': {
'query': {
'match_all': {}
},
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population',
'missing': 1
},
'weight': 3
}]
}
}],
'filter': [{
'terms': {
Expand Down
Loading