Browse Source

Merge pull request #527 from pelias/enable_borough_for_search

enable borough for search
pull/358/merge
Peter Johnson a.k.a. insertcoffee 9 years ago
parent
commit
2d136f75ea
  1. 1
      query/search.js
  2. 8
      test/unit/fixture/search_full_address.js
  3. 8
      test/unit/fixture/search_partial_address.js
  4. 8
      test/unit/fixture/search_regions_address.js

1
query/search.js

@ -30,6 +30,7 @@ query.score( peliasQuery.view.admin('country_a') );
query.score( peliasQuery.view.admin('region') ); query.score( peliasQuery.view.admin('region') );
query.score( peliasQuery.view.admin('region_a') ); query.score( peliasQuery.view.admin('region_a') );
query.score( peliasQuery.view.admin('county') ); query.score( peliasQuery.view.admin('county') );
query.score( peliasQuery.view.admin('borough') );
query.score( peliasQuery.view.admin('localadmin') ); query.score( peliasQuery.view.admin('localadmin') );
query.score( peliasQuery.view.admin('locality') ); query.score( peliasQuery.view.admin('locality') );
query.score( peliasQuery.view.admin('neighbourhood') ); query.score( peliasQuery.view.admin('neighbourhood') );

8
test/unit/fixture/search_full_address.js

@ -139,6 +139,14 @@ module.exports = {
'analyzer': vs['admin:county:analyzer'] 'analyzer': vs['admin:county:analyzer']
} }
} }
}, {
'match': {
'parent.borough': {
'query': 'new york',
'boost': vs['admin:borough:boost'],
'analyzer': vs['admin:borough:analyzer']
}
}
}, { }, {
'match': { 'match': {
'parent.localadmin': { 'parent.localadmin': {

8
test/unit/fixture/search_partial_address.js

@ -107,6 +107,14 @@ module.exports = {
'analyzer': vs['admin:county:analyzer'] 'analyzer': vs['admin:county:analyzer']
} }
} }
}, {
'match': {
'parent.borough': {
'query': 'new york',
'boost': vs['admin:borough:boost'],
'analyzer': vs['admin:borough:analyzer']
}
}
}, { }, {
'match': { 'match': {
'parent.localadmin': { 'parent.localadmin': {

8
test/unit/fixture/search_regions_address.js

@ -123,6 +123,14 @@ module.exports = {
'analyzer': vs['admin:county:analyzer'] 'analyzer': vs['admin:county:analyzer']
} }
} }
}, {
'match': {
'parent.borough': {
'query': 'manhattan',
'boost': vs['admin:borough:boost'],
'analyzer': vs['admin:borough:analyzer']
}
}
}, { }, {
'match': { 'match': {
'parent.localadmin': { 'parent.localadmin': {

Loading…
Cancel
Save