Skip to content

Commit 5632edf

Browse files
authored
Merge pull request #1397 from pelias/name-field-boost
feat(autocomplete): Add a boost to name in multi_match
2 parents f25a950 + f074f61 commit 5632edf

4 files changed

+4
-3
lines changed

Diff for: query/autocomplete_defaults.js

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ module.exports = _.merge({}, peliasQuery.defaults, {
127127
// this is used to improve venue matching in cases where the we
128128
// are unsure if the tokens represent admin or name components.
129129
'admin:add_name_to_multimatch:field': 'name.default',
130+
'admin:add_name_to_multimatch:boost': 1.5,
130131

131132
'popularity:field': 'popularity',
132133
'popularity:modifier': 'log1p',

Diff for: test/unit/fixture/autocomplete_linguistic_multiple_tokens.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
'parent.locality_a.ngram^1',
2929
'parent.region_a.ngram^1',
3030
'parent.country_a.ngram^1',
31-
'name.default^1'
31+
'name.default^1.5'
3232
],
3333
'query': 'three',
3434
'analyzer': 'peliasQuery',

Diff for: test/unit/fixture/autocomplete_linguistic_with_admin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
'parent.locality_a.ngram^1',
2828
'parent.region_a.ngram^1',
2929
'parent.country_a.ngram^1',
30-
'name.default^1'
30+
'name.default^1.5'
3131
],
3232
'query': 'three',
3333
'analyzer': 'peliasAdmin',

Diff for: test/unit/fixture/autocomplete_single_character_street.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
'parent.locality_a.ngram^1',
2626
'parent.region_a.ngram^1',
2727
'parent.country_a.ngram^1',
28-
'name.default^1'
28+
'name.default^1.5'
2929
],
3030
'query': 'laird',
3131
'analyzer': 'peliasAdmin',

0 commit comments

Comments
 (0)