diff --git a/schema.js b/schema.js index 17e6e6c5..b50825c8 100644 --- a/schema.js +++ b/schema.js @@ -19,15 +19,20 @@ var schema = { querying against non-existant _types will result in errors. **/ - country: doc, - dependency: doc, - macroregion: doc, - region: doc, - macrocounty: doc, - county: doc, - localadmin: doc, + venue: doc, + address: doc, + street: doc, + neighbourhood: doc, + borough: doc, + postalcode: doc, locality: doc, - borough: doc + localadmin: doc, + county: doc, + macrocounty: doc, + region: doc, + macroregion: doc, + dependency: doc, + country: doc } }; diff --git a/test/fixtures/config.json b/test/fixtures/config.json index 772b2eed..45608431 100644 --- a/test/fixtures/config.json +++ b/test/fixtures/config.json @@ -2,8 +2,10 @@ "elasticsearch": { "settings": { "index": { - "number_of_replicas": "999" + "number_of_replicas": "999", + "number_of_shards": "5", + "refresh_interval": "1m" } } } -} \ No newline at end of file +} diff --git a/test/fixtures/expected.json b/test/fixtures/expected.json index 2f3c260e..27113164 100644 --- a/test/fixtures/expected.json +++ b/test/fixtures/expected.json @@ -1864,7 +1864,1472 @@ }, "dynamic": "true" }, - "country": { + "venue": { + "properties": { + "source": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "layer": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "alpha3": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "name": { + "type": "object", + "dynamic": true + }, + "phrase": { + "type": "object", + "dynamic": true + }, + "address_parts": { + "type": "object", + "dynamic": true, + "properties": { + "name": { + "type": "string", + "analyzer": "keyword" + }, + "number": { + "type": "string", + "analyzer": "peliasHousenumber" + }, + "street": { + "type": "string", + "analyzer": "peliasStreet" + }, + "zip": { + "type": "string", + "analyzer": "peliasZip" + } + } + }, + "parent": { + "type": "object", + "dynamic": true, + "properties": { + "country": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "dependency": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macroregion": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "region": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macrocounty": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "county": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "locality": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "borough": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "localadmin": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "neighbourhood": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "postalcode": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_a": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + } + } + }, + "center_point": { + "type": "geo_point", + "lat_lon": true, + "geohash": true, + "geohash_prefix": true, + "geohash_precision": 18 + }, + "shape": { + "type": "geo_shape", + "tree": "quadtree", + "tree_levels": "20" + }, + "bounding_box": { + "type": "string", + "index": "no", + "store": "yes" + }, + "source_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "category": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "population": { + "type": "long", + "null_value": 0 + }, + "popularity": { + "type": "long", + "null_value": 0 + } + }, + "dynamic_templates": [ + { + "nameGram": { + "path_match": "name.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasIndexOneEdgeGram", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + }, + { + "phrase": { + "path_match": "phrase.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasPhrase", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + } + ], + "_source": { + "excludes": [ + "shape", + "phrase" + ] + }, + "_all": { + "enabled": false + }, + "dynamic": "true" + }, + "address": { + "properties": { + "source": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "layer": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "alpha3": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "name": { + "type": "object", + "dynamic": true + }, + "phrase": { + "type": "object", + "dynamic": true + }, + "address_parts": { + "type": "object", + "dynamic": true, + "properties": { + "name": { + "type": "string", + "analyzer": "keyword" + }, + "number": { + "type": "string", + "analyzer": "peliasHousenumber" + }, + "street": { + "type": "string", + "analyzer": "peliasStreet" + }, + "zip": { + "type": "string", + "analyzer": "peliasZip" + } + } + }, + "parent": { + "type": "object", + "dynamic": true, + "properties": { + "country": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "dependency": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macroregion": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "region": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macrocounty": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "county": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "locality": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "borough": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "localadmin": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "neighbourhood": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "postalcode": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_a": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + } + } + }, + "center_point": { + "type": "geo_point", + "lat_lon": true, + "geohash": true, + "geohash_prefix": true, + "geohash_precision": 18 + }, + "shape": { + "type": "geo_shape", + "tree": "quadtree", + "tree_levels": "20" + }, + "bounding_box": { + "type": "string", + "index": "no", + "store": "yes" + }, + "source_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "category": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "population": { + "type": "long", + "null_value": 0 + }, + "popularity": { + "type": "long", + "null_value": 0 + } + }, + "dynamic_templates": [ + { + "nameGram": { + "path_match": "name.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasIndexOneEdgeGram", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + }, + { + "phrase": { + "path_match": "phrase.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasPhrase", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + } + ], + "_source": { + "excludes": [ + "shape", + "phrase" + ] + }, + "_all": { + "enabled": false + }, + "dynamic": "true" + }, + "street": { + "properties": { + "source": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "layer": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "alpha3": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "name": { + "type": "object", + "dynamic": true + }, + "phrase": { + "type": "object", + "dynamic": true + }, + "address_parts": { + "type": "object", + "dynamic": true, + "properties": { + "name": { + "type": "string", + "analyzer": "keyword" + }, + "number": { + "type": "string", + "analyzer": "peliasHousenumber" + }, + "street": { + "type": "string", + "analyzer": "peliasStreet" + }, + "zip": { + "type": "string", + "analyzer": "peliasZip" + } + } + }, + "parent": { + "type": "object", + "dynamic": true, + "properties": { + "country": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "dependency": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macroregion": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "region": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macrocounty": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "county": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "locality": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "borough": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "localadmin": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "neighbourhood": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "postalcode": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_a": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + } + } + }, + "center_point": { + "type": "geo_point", + "lat_lon": true, + "geohash": true, + "geohash_prefix": true, + "geohash_precision": 18 + }, + "shape": { + "type": "geo_shape", + "tree": "quadtree", + "tree_levels": "20" + }, + "bounding_box": { + "type": "string", + "index": "no", + "store": "yes" + }, + "source_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "category": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "population": { + "type": "long", + "null_value": 0 + }, + "popularity": { + "type": "long", + "null_value": 0 + } + }, + "dynamic_templates": [ + { + "nameGram": { + "path_match": "name.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasIndexOneEdgeGram", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + }, + { + "phrase": { + "path_match": "phrase.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasPhrase", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + } + ], + "_source": { + "excludes": [ + "shape", + "phrase" + ] + }, + "_all": { + "enabled": false + }, + "dynamic": "true" + }, + "neighbourhood": { + "properties": { + "source": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "layer": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "alpha3": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "name": { + "type": "object", + "dynamic": true + }, + "phrase": { + "type": "object", + "dynamic": true + }, + "address_parts": { + "type": "object", + "dynamic": true, + "properties": { + "name": { + "type": "string", + "analyzer": "keyword" + }, + "number": { + "type": "string", + "analyzer": "peliasHousenumber" + }, + "street": { + "type": "string", + "analyzer": "peliasStreet" + }, + "zip": { + "type": "string", + "analyzer": "peliasZip" + } + } + }, + "parent": { + "type": "object", + "dynamic": true, + "properties": { + "country": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "dependency": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macroregion": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "region": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macrocounty": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "county": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "locality": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "borough": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "localadmin": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "neighbourhood": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "postalcode": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_a": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + } + } + }, + "center_point": { + "type": "geo_point", + "lat_lon": true, + "geohash": true, + "geohash_prefix": true, + "geohash_precision": 18 + }, + "shape": { + "type": "geo_shape", + "tree": "quadtree", + "tree_levels": "20" + }, + "bounding_box": { + "type": "string", + "index": "no", + "store": "yes" + }, + "source_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "category": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "population": { + "type": "long", + "null_value": 0 + }, + "popularity": { + "type": "long", + "null_value": 0 + } + }, + "dynamic_templates": [ + { + "nameGram": { + "path_match": "name.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasIndexOneEdgeGram", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + }, + { + "phrase": { + "path_match": "phrase.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasPhrase", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + } + ], + "_source": { + "excludes": [ + "shape", + "phrase" + ] + }, + "_all": { + "enabled": false + }, + "dynamic": "true" + }, + "borough": { + "properties": { + "source": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "layer": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "alpha3": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "name": { + "type": "object", + "dynamic": true + }, + "phrase": { + "type": "object", + "dynamic": true + }, + "address_parts": { + "type": "object", + "dynamic": true, + "properties": { + "name": { + "type": "string", + "analyzer": "keyword" + }, + "number": { + "type": "string", + "analyzer": "peliasHousenumber" + }, + "street": { + "type": "string", + "analyzer": "peliasStreet" + }, + "zip": { + "type": "string", + "analyzer": "peliasZip" + } + } + }, + "parent": { + "type": "object", + "dynamic": true, + "properties": { + "country": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "country_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "dependency": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "dependency_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macroregion": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macroregion_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "region": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "region_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "macrocounty": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "macrocounty_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "county": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "county_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "locality": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "locality_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "borough": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "borough_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "localadmin": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "localadmin_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "neighbourhood": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_a": { + "type": "string", + "analyzer": "peliasAdmin", + "store": "yes" + }, + "neighbourhood_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "postalcode": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_a": { + "type": "string", + "analyzer": "peliasZip", + "store": "yes" + }, + "postalcode_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + } + } + }, + "center_point": { + "type": "geo_point", + "lat_lon": true, + "geohash": true, + "geohash_prefix": true, + "geohash_precision": 18 + }, + "shape": { + "type": "geo_shape", + "tree": "quadtree", + "tree_levels": "20" + }, + "bounding_box": { + "type": "string", + "index": "no", + "store": "yes" + }, + "source_id": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "category": { + "type": "string", + "analyzer": "keyword", + "store": "yes" + }, + "population": { + "type": "long", + "null_value": 0 + }, + "popularity": { + "type": "long", + "null_value": 0 + } + }, + "dynamic_templates": [ + { + "nameGram": { + "path_match": "name.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasIndexOneEdgeGram", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + }, + { + "phrase": { + "path_match": "phrase.*", + "match_mapping_type": "string", + "mapping": { + "type": "string", + "analyzer": "peliasPhrase", + "fielddata": { + "loading": "eager_global_ordinals" + } + } + } + } + ], + "_source": { + "excludes": [ + "shape", + "phrase" + ] + }, + "_all": { + "enabled": false + }, + "dynamic": "true" + }, + "postalcode": { "properties": { "source": { "type": "string", @@ -2157,7 +3622,7 @@ }, "dynamic": "true" }, - "dependency": { + "locality": { "properties": { "source": { "type": "string", @@ -2450,7 +3915,7 @@ }, "dynamic": "true" }, - "macroregion": { + "localadmin": { "properties": { "source": { "type": "string", @@ -2743,7 +4208,7 @@ }, "dynamic": "true" }, - "region": { + "county": { "properties": { "source": { "type": "string", @@ -3329,7 +4794,7 @@ }, "dynamic": "true" }, - "county": { + "region": { "properties": { "source": { "type": "string", @@ -3622,7 +5087,7 @@ }, "dynamic": "true" }, - "localadmin": { + "macroregion": { "properties": { "source": { "type": "string", @@ -3915,7 +5380,7 @@ }, "dynamic": "true" }, - "locality": { + "dependency": { "properties": { "source": { "type": "string", @@ -4208,7 +5673,7 @@ }, "dynamic": "true" }, - "borough": { + "country": { "properties": { "source": { "type": "string",