Skip to content

Commit

Permalink
feat(admin_ngrams): revert ccb9bc8
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Mar 18, 2019
1 parent 0789e09 commit 43a4bed
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
18 changes: 9 additions & 9 deletions query/autocomplete_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,47 +53,47 @@ module.exports = _.merge({}, peliasQuery.defaults, {
'address:postcode:cutoff_frequency': 0.01,

'admin:country_a:analyzer': 'standard',
'admin:country_a:field': 'parent.country_a.ngram',
'admin:country_a:field': 'parent.country_a',
'admin:country_a:boost': 1000,
'admin:country_a:cutoff_frequency': 0.01,

'admin:country:analyzer': 'peliasAdmin',
'admin:country:field': 'parent.country.ngram',
'admin:country:field': 'parent.country',
'admin:country:boost': 800,
'admin:country:cutoff_frequency': 0.01,

'admin:region:analyzer': 'peliasAdmin',
'admin:region:field': 'parent.region.ngram',
'admin:region:field': 'parent.region',
'admin:region:boost': 600,
'admin:region:cutoff_frequency': 0.01,

'admin:region_a:analyzer': 'peliasAdmin',
'admin:region_a:field': 'parent.region_a.ngram',
'admin:region_a:field': 'parent.region_a',
'admin:region_a:boost': 600,
'admin:region_a:cutoff_frequency': 0.01,

'admin:county:analyzer': 'peliasAdmin',
'admin:county:field': 'parent.county.ngram',
'admin:county:field': 'parent.county',
'admin:county:boost': 400,
'admin:county:cutoff_frequency': 0.01,

'admin:localadmin:analyzer': 'peliasAdmin',
'admin:localadmin:field': 'parent.localadmin.ngram',
'admin:localadmin:field': 'parent.localadmin',
'admin:localadmin:boost': 200,
'admin:localadmin:cutoff_frequency': 0.01,

'admin:locality:analyzer': 'peliasAdmin',
'admin:locality:field': 'parent.locality.ngram',
'admin:locality:field': 'parent.locality',
'admin:locality:boost': 200,
'admin:locality:cutoff_frequency': 0.01,

'admin:neighbourhood:analyzer': 'peliasAdmin',
'admin:neighbourhood:field': 'parent.neighbourhood.ngram',
'admin:neighbourhood:field': 'parent.neighbourhood',
'admin:neighbourhood:boost': 200,
'admin:neighbourhood:cutoff_frequency': 0.01,

'admin:borough:analyzer': 'peliasAdmin',
'admin:borough:field': 'parent.borough.ngram',
'admin:borough:field': 'parent.borough',
'admin:borough:boost': 600,
'admin:borough:cutoff_frequency': 0.01,

Expand Down
2 changes: 1 addition & 1 deletion test/unit/fixture/autocomplete_boundary_country.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = {
}],
'filter': [{
'match': {
'parent.country_a.ngram': {
'parent.country_a': {
'analyzer': 'standard',
'query': 'ABC'
}
Expand Down
16 changes: 8 additions & 8 deletions test/unit/fixture/autocomplete_linguistic_with_admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
'should': [
{
'match': {
'parent.country.ngram': {
'parent.country': {
'analyzer': 'peliasAdmin',
'boost': 800,
'cutoff_frequency': 0.01,
Expand All @@ -28,7 +28,7 @@ module.exports = {
},
{
'match': {
'parent.region.ngram': {
'parent.region': {
'analyzer': 'peliasAdmin',
'cutoff_frequency': 0.01,
'boost': 600,
Expand All @@ -38,7 +38,7 @@ module.exports = {
},
{
'match': {
'parent.region_a.ngram': {
'parent.region_a': {
'analyzer': 'peliasAdmin',
'cutoff_frequency': 0.01,
'boost': 600,
Expand All @@ -48,7 +48,7 @@ module.exports = {
},
{
'match': {
'parent.county.ngram': {
'parent.county': {
'analyzer': 'peliasAdmin',
'cutoff_frequency': 0.01,
'boost': 400,
Expand All @@ -58,7 +58,7 @@ module.exports = {
},
{
'match': {
'parent.borough.ngram': {
'parent.borough': {
'analyzer': 'peliasAdmin',
'cutoff_frequency': 0.01,
'boost': 600,
Expand All @@ -68,7 +68,7 @@ module.exports = {
},
{
'match': {
'parent.localadmin.ngram': {
'parent.localadmin': {
'analyzer': 'peliasAdmin',
'cutoff_frequency': 0.01,
'boost': 200,
Expand All @@ -78,7 +78,7 @@ module.exports = {
},
{
'match': {
'parent.locality.ngram': {
'parent.locality': {
'analyzer': 'peliasAdmin',
'cutoff_frequency': 0.01,
'boost': 200,
Expand All @@ -88,7 +88,7 @@ module.exports = {
},
{
'match': {
'parent.neighbourhood.ngram': {
'parent.neighbourhood': {
'analyzer': 'peliasAdmin',
'cutoff_frequency': 0.01,
'boost': 200,
Expand Down
16 changes: 8 additions & 8 deletions test/unit/fixture/autocomplete_single_character_street.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
}
}, {
'match': {
'parent.country.ngram': {
'parent.country': {
'query': 'laird',
'cutoff_frequency': 0.01,
'boost': 800,
Expand All @@ -34,7 +34,7 @@ module.exports = {
}
}, {
'match': {
'parent.region.ngram': {
'parent.region': {
'query': 'laird',
'cutoff_frequency': 0.01,
'boost': 600,
Expand All @@ -43,7 +43,7 @@ module.exports = {
}
}, {
'match': {
'parent.region_a.ngram': {
'parent.region_a': {
'query': 'laird',
'cutoff_frequency': 0.01,
'boost': 600,
Expand All @@ -52,7 +52,7 @@ module.exports = {
}
}, {
'match': {
'parent.county.ngram': {
'parent.county': {
'query': 'laird',
'cutoff_frequency': 0.01,
'boost': 400,
Expand All @@ -61,7 +61,7 @@ module.exports = {
}
}, {
'match': {
'parent.borough.ngram': {
'parent.borough': {
'analyzer': 'peliasAdmin',
'cutoff_frequency': 0.01,
'boost': 600,
Expand All @@ -70,7 +70,7 @@ module.exports = {
}
}, {
'match': {
'parent.localadmin.ngram': {
'parent.localadmin': {
'query': 'laird',
'cutoff_frequency': 0.01,
'boost': 200,
Expand All @@ -79,7 +79,7 @@ module.exports = {
}
}, {
'match': {
'parent.locality.ngram': {
'parent.locality': {
'query': 'laird',
'cutoff_frequency': 0.01,
'boost': 200,
Expand All @@ -88,7 +88,7 @@ module.exports = {
}
}, {
'match': {
'parent.neighbourhood.ngram': {
'parent.neighbourhood': {
'query': 'laird',
'cutoff_frequency': 0.01,
'boost': 200,
Expand Down

0 comments on commit 43a4bed

Please sign in to comment.