Skip to content

Commit 4cf4c1a

Browse files
authored
Merge pull request #83 from pelias/config_source_layers
feat(targets): add API filter targets to config
2 parents 8c04125 + 9a7d075 commit 4cf4c1a

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

config/defaults.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,36 @@
3636
"textAnalyzer": "libpostal",
3737
"host": "http://pelias.mapzen.com/",
3838
"indexName": "pelias",
39-
"version": "1.0"
39+
"version": "1.0",
40+
"targets": {
41+
"auto_discover": false,
42+
"layers_by_source": {
43+
"openstreetmap": [ "address", "venue", "street" ],
44+
"openaddresses": [ "address" ],
45+
"geonames": [
46+
"country", "macroregion", "region", "county", "localadmin", "locality", "borough",
47+
"neighbourhood", "venue"
48+
],
49+
"whosonfirst": [
50+
"continent", "empire", "country", "dependency", "macroregion", "region", "locality",
51+
"localadmin", "macrocounty", "county", "macrohood", "borough", "neighbourhood",
52+
"microhood", "disputed", "venue", "postalcode", "continent", "ocean", "marinearea"
53+
]
54+
},
55+
"source_aliases": {
56+
"osm": [ "openstreetmap" ],
57+
"oa": [ "openaddresses" ],
58+
"gn": [ "geonames" ],
59+
"wof": [ "whosonfirst" ]
60+
},
61+
"layer_aliases": {
62+
"coarse": [
63+
"continent", "empire", "country", "dependency", "macroregion", "region", "locality",
64+
"localadmin", "macrocounty", "county", "macrohood", "borough", "neighbourhood",
65+
"microhood", "disputed", "postalcode", "continent", "ocean", "marinearea"
66+
]
67+
}
68+
}
4069
},
4170
"schema": {
4271
"indexName": "pelias"

config/expected-deep.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,36 @@
4141
"textAnalyzer": "libpostal",
4242
"indexName": "pelias",
4343
"host": "http://pelias.mapzen.com/",
44-
"version": "1.0"
44+
"version": "1.0",
45+
"targets": {
46+
"auto_discover": false,
47+
"layers_by_source": {
48+
"openstreetmap": [ "address", "venue", "street" ],
49+
"openaddresses": [ "address" ],
50+
"geonames": [
51+
"country", "macroregion", "region", "county", "localadmin", "locality", "borough",
52+
"neighbourhood", "venue"
53+
],
54+
"whosonfirst": [
55+
"continent", "empire", "country", "dependency", "macroregion", "region", "locality",
56+
"localadmin", "macrocounty", "county", "macrohood", "borough", "neighbourhood",
57+
"microhood", "disputed", "venue", "postalcode", "continent", "ocean", "marinearea"
58+
]
59+
},
60+
"source_aliases": {
61+
"osm": [ "openstreetmap" ],
62+
"oa": [ "openaddresses" ],
63+
"gn": [ "geonames" ],
64+
"wof": [ "whosonfirst" ]
65+
},
66+
"layer_aliases": {
67+
"coarse": [
68+
"continent", "empire", "country", "dependency", "macroregion", "region", "locality",
69+
"localadmin", "macrocounty", "county", "macrohood", "borough", "neighbourhood",
70+
"microhood", "disputed", "postalcode", "continent", "ocean", "marinearea"
71+
]
72+
}
73+
}
4574
},
4675
"schema": {
4776
"indexName": "pelias"

0 commit comments

Comments
 (0)