diff --git a/query/view/boost_exact_matches.js b/query/view/boost_exact_matches.js index 75929751..7284f435 100644 --- a/query/view/boost_exact_matches.js +++ b/query/view/boost_exact_matches.js @@ -45,6 +45,10 @@ module.exports = function( includePartialTokens ){ vsCopy.var('phrase:analyzer').set(searchDefaults['phrase:analyzer']); vsCopy.var('phrase:field').set(searchDefaults['phrase:field']); + if (includePartialTokens) { + vsCopy.var('phrase:boost').set(searchDefaults['phrase:boost'] * 0.5); + } + // get a copy of only the *complete* tokens produced from the input:name var tokens = vs.var('input:name:tokens_complete').get(); diff --git a/test/unit/fixture/autocomplete_boundary_country.js b/test/unit/fixture/autocomplete_boundary_country.js index 7459ec85..c9645e63 100644 --- a/test/unit/fixture/autocomplete_boundary_country.js +++ b/test/unit/fixture/autocomplete_boundary_country.js @@ -28,7 +28,7 @@ module.exports = { 'match': { 'phrase.default': { 'analyzer': 'peliasPhrase', - 'boost': 1, + 'boost': 0.5, 'slop': 3, 'query': 'test', 'type': 'phrase' diff --git a/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js b/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js index 3c6fe644..4853f95d 100644 --- a/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js +++ b/test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js @@ -22,7 +22,7 @@ module.exports = { 'phrase.default': { 'analyzer': 'peliasPhrase', 'type': 'phrase', - 'boost': 1, + 'boost': 0.5, 'slop': 3, 'query': 'test' } diff --git a/test/unit/fixture/autocomplete_linguistic_final_token.js b/test/unit/fixture/autocomplete_linguistic_final_token.js index 2c9fe7eb..44194ea8 100644 --- a/test/unit/fixture/autocomplete_linguistic_final_token.js +++ b/test/unit/fixture/autocomplete_linguistic_final_token.js @@ -26,7 +26,7 @@ module.exports = { 'match': { 'phrase.default': { 'analyzer': 'peliasPhrase', - 'boost': 1, + 'boost': 0.5, 'slop': 3, 'query': 'one t', 'type': 'phrase' diff --git a/test/unit/fixture/autocomplete_linguistic_focus.js b/test/unit/fixture/autocomplete_linguistic_focus.js index 781c9b7b..bcfc85e6 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus.js +++ b/test/unit/fixture/autocomplete_linguistic_focus.js @@ -21,7 +21,7 @@ module.exports = { 'match': { 'phrase.default': { 'analyzer': 'peliasPhrase', - 'boost': 1, + 'boost': 0.5, 'slop': 3, 'query': 'test', 'type': 'phrase' diff --git a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js index 1be210e1..4217ff74 100644 --- a/test/unit/fixture/autocomplete_linguistic_focus_null_island.js +++ b/test/unit/fixture/autocomplete_linguistic_focus_null_island.js @@ -21,7 +21,7 @@ module.exports = { 'match': { 'phrase.default': { 'analyzer': 'peliasPhrase', - 'boost': 1, + 'boost': 0.5, 'slop': 3, 'query': 'test', 'type': 'phrase' diff --git a/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js b/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js index 117bf570..64802eae 100644 --- a/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js +++ b/test/unit/fixture/autocomplete_linguistic_multiple_tokens.js @@ -45,7 +45,7 @@ module.exports = { 'phrase.default': { 'analyzer' : 'peliasPhrase', 'type' : 'phrase', - 'boost' : 1, + 'boost' : 0.5, 'slop' : 3, 'query' : 'one two three' } diff --git a/test/unit/fixture/autocomplete_linguistic_only.js b/test/unit/fixture/autocomplete_linguistic_only.js index dadeb9e9..7c4cbf06 100644 --- a/test/unit/fixture/autocomplete_linguistic_only.js +++ b/test/unit/fixture/autocomplete_linguistic_only.js @@ -22,7 +22,7 @@ module.exports = { 'phrase.default': { 'analyzer': 'peliasPhrase', 'type': 'phrase', - 'boost': 1, + 'boost': 0.5, 'slop': 3, 'query': 'test' } diff --git a/test/unit/fixture/autocomplete_with_layer_filtering.js b/test/unit/fixture/autocomplete_with_layer_filtering.js index 509f8561..f7330d44 100644 --- a/test/unit/fixture/autocomplete_with_layer_filtering.js +++ b/test/unit/fixture/autocomplete_with_layer_filtering.js @@ -21,7 +21,7 @@ module.exports = { 'match': { 'phrase.default': { 'analyzer': 'peliasPhrase', - 'boost': 1, + 'boost': 0.5, 'slop': 3, 'query': 'test', 'type': 'phrase' diff --git a/test/unit/fixture/autocomplete_with_source_filtering.js b/test/unit/fixture/autocomplete_with_source_filtering.js index 00d7c21a..f47a2663 100644 --- a/test/unit/fixture/autocomplete_with_source_filtering.js +++ b/test/unit/fixture/autocomplete_with_source_filtering.js @@ -21,7 +21,7 @@ module.exports = { 'match': { 'phrase.default': { 'analyzer': 'peliasPhrase', - 'boost': 1, + 'boost': 0.5, 'slop': 3, 'query': 'test', 'type': 'phrase'