Browse Source

enable borough for search

pull/527/head
missinglink 9 years ago
parent
commit
0c67347c27
  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_a') );
query.score( peliasQuery.view.admin('county') );
query.score( peliasQuery.view.admin('borough') );
query.score( peliasQuery.view.admin('localadmin') );
query.score( peliasQuery.view.admin('locality') );
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']
}
}
}, {
'match': {
'parent.borough': {
'query': 'new york',
'boost': vs['admin:borough:boost'],
'analyzer': vs['admin:borough:analyzer']
}
}
}, {
'match': {
'parent.localadmin': {

8
test/unit/fixture/search_partial_address.js

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

8
test/unit/fixture/search_regions_address.js

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

Loading…
Cancel
Save