Skip to content

Commit

Permalink
fix: Merge pull request #1162 from pelias/remove_focus_selected_layers
Browse files Browse the repository at this point in the history
Remove focus_selected_layers query view
  • Loading branch information
orangejulius authored Jun 14, 2018
2 parents 713b236 + 561f079 commit 8f2f55c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 70 deletions.
3 changes: 1 addition & 2 deletions query/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const logger = require('pelias-logger').get('api');
// additional views (these may be merged in to pelias/query at a later date)
var views = {
ngrams_strict: require('./view/ngrams_strict'),
focus_selected_layers: require('./view/focus_selected_layers'),
ngrams_last_token_only: require('./view/ngrams_last_token_only'),
phrase_first_tokens_only: require('./view/phrase_first_tokens_only'),
pop_subquery: require('./view/pop_subquery'),
Expand Down Expand Up @@ -42,7 +41,7 @@ query.score( peliasQuery.view.admin('neighbourhood') );

// scoring boost
query.score( views.boost_exact_matches );
query.score( views.focus_selected_layers( views.ngrams_strict ) );
query.score( peliasQuery.view.focus( views.ngrams_strict ) );
query.score( peliasQuery.view.popularity( views.pop_subquery ) );
query.score( peliasQuery.view.population( views.pop_subquery ) );

Expand Down
38 changes: 0 additions & 38 deletions query/view/focus_selected_layers.js

This file was deleted.

16 changes: 1 addition & 15 deletions test/unit/fixture/autocomplete_linguistic_focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,7 @@ module.exports = {
'weight': 15
}],
'score_mode': 'avg',
'boost_mode': 'replace',
'filter': {
'or': [
{
'term': {
'layer': 'venue'
}
},
{
'term': {
'layer': 'address'
}
}
]
}
'boost_mode': 'replace'
}
},{
'function_score': {
Expand Down
16 changes: 1 addition & 15 deletions test/unit/fixture/autocomplete_linguistic_focus_null_island.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,7 @@ module.exports = {
'weight': 15
}],
'score_mode': 'avg',
'boost_mode': 'replace',
'filter': {
'or': [
{
'term': {
'layer': 'venue'
}
},
{
'term': {
'layer': 'address'
}
}
]
}
'boost_mode': 'replace'
}
},{
'function_score': {
Expand Down

0 comments on commit 8f2f55c

Please sign in to comment.