Browse Source

Base admin fields on placetypes

pull/522/head
Julian Simioni 9 years ago
parent
commit
f8af354e71
No known key found for this signature in database
GPG Key ID: 6DAD08919FDBF563
  1. 11
      query/text_parser.js

11
query/text_parser.js

@ -1,20 +1,15 @@
var logger = require('pelias-logger').get('api');
var placeTypes = require('../helper/placeTypes');
/*
This list should only contain admin fields we are comfortable matching in the case
when we can't identify parts of an address. This shouldn't contain fields like country_a
or postalcode because we should only try to match those when we're sure that's what they are.
*/
var adminFields = [
'country',
'region',
var adminFields = placeTypes.concat([
'region_a',
'county',
'localadmin',
'locality',
'neighbourhood'
];
]);
/**
@todo: refactor me

Loading…
Cancel
Save