Browse Source

Set all admin boosts to 1

They seem to interfere with the new multi_match query. More tweaking in
the future is definitely warranted.
pull/481/head
Julian Simioni 9 years ago committed by Julian Simioni
parent
commit
373a08e79b
No known key found for this signature in database
GPG Key ID: 6DAD08919FDBF563
  1. 10
      query/search_defaults.js
  2. 8
      test/unit/fixture/search_full_address.js
  3. 10
      test/unit/fixture/search_partial_address.js
  4. 8
      test/unit/fixture/search_regions_address.js

10
query/search_defaults.js

@ -52,23 +52,23 @@ module.exports = _.merge({}, peliasQuery.defaults, {
'admin:country_a:analyzer': 'standard', 'admin:country_a:analyzer': 'standard',
'admin:country_a:field': 'parent.country_a', 'admin:country_a:field': 'parent.country_a',
'admin:country_a:boost': 5, 'admin:country_a:boost': 1,
'admin:country:analyzer': 'peliasAdmin', 'admin:country:analyzer': 'peliasAdmin',
'admin:country:field': 'parent.country', 'admin:country:field': 'parent.country',
'admin:country:boost': 4, 'admin:country:boost': 1,
'admin:region:analyzer': 'peliasAdmin', 'admin:region:analyzer': 'peliasAdmin',
'admin:region:field': 'parent.region', 'admin:region:field': 'parent.region',
'admin:region:boost': 3, 'admin:region:boost': 1,
'admin:region_a:analyzer': 'peliasAdmin', 'admin:region_a:analyzer': 'peliasAdmin',
'admin:region_a:field': 'parent.region_a', 'admin:region_a:field': 'parent.region_a',
'admin:region_a:boost': 3, 'admin:region_a:boost': 1,
'admin:county:analyzer': 'peliasAdmin', 'admin:county:analyzer': 'peliasAdmin',
'admin:county:field': 'parent.county', 'admin:county:field': 'parent.county',
'admin:county:boost': 2, 'admin:county:boost': 1,
'admin:localadmin:analyzer': 'peliasAdmin', 'admin:localadmin:analyzer': 'peliasAdmin',
'admin:localadmin:field': 'parent.localadmin', 'admin:localadmin:field': 'parent.localadmin',

8
test/unit/fixture/search_full_address.js

@ -118,14 +118,14 @@ module.exports = {
}, { }, {
'multi_match': { 'multi_match': {
'fields': [ 'fields': [
'parent.country^4', 'parent.country^1',
'parent.region^3', 'parent.region^1',
'parent.county^2', 'parent.county^1',
'parent.localadmin^1', 'parent.localadmin^1',
'parent.locality^1', 'parent.locality^1',
'parent.borough^1', 'parent.borough^1',
'parent.neighbourhood^1', 'parent.neighbourhood^1',
'parent.region_a^3' 'parent.region_a^1'
], ],
'query': 'new york', 'query': 'new york',
'analyzer': 'peliasAdmin' 'analyzer': 'peliasAdmin'

10
test/unit/fixture/search_partial_address.js

@ -79,21 +79,21 @@ module.exports = {
'match': { 'match': {
'parent.region_a': { 'parent.region_a': {
'analyzer': 'peliasAdmin', 'analyzer': 'peliasAdmin',
'boost': 3, 'boost': 1,
'query': 'new york' 'query': 'new york'
} }
} }
}, { }, {
'multi_match': { 'multi_match': {
'fields': [ 'fields': [
'parent.country^4', 'parent.country^1',
'parent.region^3', 'parent.region^1',
'parent.county^2', 'parent.county^1',
'parent.localadmin^1', 'parent.localadmin^1',
'parent.locality^1', 'parent.locality^1',
'parent.borough^1', 'parent.borough^1',
'parent.neighbourhood^1', 'parent.neighbourhood^1',
'parent.region_a^3' 'parent.region_a^1'
], ],
'query': 'new york', 'query': 'new york',
'analyzer': 'peliasAdmin' 'analyzer': 'peliasAdmin'

8
test/unit/fixture/search_regions_address.js

@ -102,14 +102,14 @@ module.exports = {
}, { }, {
'multi_match': { 'multi_match': {
'fields': [ 'fields': [
'parent.country^4', 'parent.country^1',
'parent.region^3', 'parent.region^1',
'parent.county^2', 'parent.county^1',
'parent.localadmin^1', 'parent.localadmin^1',
'parent.locality^1', 'parent.locality^1',
'parent.borough^1', 'parent.borough^1',
'parent.neighbourhood^1', 'parent.neighbourhood^1',
'parent.region_a^3' 'parent.region_a^1'
], ],
'query': 'manhattan', 'query': 'manhattan',
'analyzer': 'peliasAdmin' 'analyzer': 'peliasAdmin'

Loading…
Cancel
Save