this feature was requested by a client who would like an easier way of editing the postal cities mapping files.
prior to this PR the files are difficult to modify because they exist within a node_modules path within each of the importers.
this PR allows the user to specify a search path in pelias.json as such:
this path is searched before the bundled data for both ${cc}.tsv and ${cc}.override.tsv files, if they are present within this directory then they will be used and the bundled files will be ignored. Else the bundled files are used.
no merging of files is performed.
creating an empty file in your search path is equivalent to deleting the corresponding bundled file within the module.
I would strongly recommend using absolute paths to avoid any error.
Setting logger.level = "debug" will print the paths of each file as it's loaded so you can ensure they are being loaded as expected.
this feature was requested by a client who would like an easier way of editing the postal cities mapping files. prior to this PR the files are difficult to modify because they exist within a
node_modules
path within each of the importers.this PR allows the user to specify a search path in
pelias.json
as such:this path is searched before the bundled data for both
${cc}.tsv
and${cc}.override.tsv
files, if they are present within this directory then they will be used and the bundled files will be ignored. Else the bundled files are used.no merging of files is performed. creating an empty file in your search path is equivalent to deleting the corresponding bundled file within the module.
I would strongly recommend using absolute paths to avoid any error.
Setting
logger.level = "debug"
will print the paths of each file as it's loaded so you can ensure they are being loaded as expected.