From 03d305eea0b14e12797847eb511f7c3dfa51b0c1 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 16 May 2019 18:26:24 -0400 Subject: [PATCH] feat(docs): Add custom source/layer documentation This ties into the new documentation for the API in https://github.com/pelias/api/pull/1297 for functionality originally added in https://github.com/pelias/api/pull/1131. Fixes https://github.com/pelias/csv-importer/issues/36 Fixes https://github.com/pelias/csv-importer/issues/26 --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 48abd8d..857f208 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,11 @@ hash. A sample configuration file might look like: } ] }, + "api": { + "targets": { + "yoursource": ["yourlayers"] + } + }, "logger": { "level": "debug" }, @@ -180,6 +185,19 @@ hash. A sample configuration file might look like: } ``` +**Important:** You must put any custom source and layers imported by your data in `pelias.json as explained in the relevant [API configuration documentation](https://github.com/pelias/api#custom-sources-and-layers). For a reasonably common use case for the source `csv` with only records in the `address` layer, the following configuration is a good starting point: + + +``` +{ + "api": { + "targets": { + "csv": ["address"] + } + } +} +``` + The following properties are recognized: This importer is configured using the [`pelias-config`](https://github.com/pelias/config) module.