From 1a8fe30a565568f65d663fc6e8b02d7c16f2976d Mon Sep 17 00:00:00 2001 From: Diana Shkolnikov Date: Tue, 9 May 2017 12:43:32 -0400 Subject: [PATCH 1/3] Add config details --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bda2627a..eeebd7e2 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,17 @@ The API ships with several convenience commands (runnable via `npm`): ## pelias-config The API recognizes the following properties under the top-level `api` key in your `pelias.json` config file: - * `accessLog`: (*optional*) The name of the format to use for access logs; may be any one of the +|parameter|required|default|description| +|---|---|---|---| +|`host`|*yes*||specifies the url under which the http service is to run| +|`textAnalyzer`|*yes*|*addressit*|can be either `libpostal` or `addressit` however will soon be deprecated and only `libpostal` will be supported going forward| +|`legacyUrl`|*no*||the url to redirect to in case the user does not specify a version such as `v1` +|`relativeScores`|*no*|true|if set to true, confidence scores will be normalized, realistically at this point setting this to false is not tested or desirable +|`accessLog`|*no*||name of the format to use for access logs; may be any one of the [predefined values](https://github.com/expressjs/morgan#predefined-formats) in the `morgan` package. Defaults to - `"common"`; if set to `false`, or an otherwise falsy value, disables access-logging entirely. + `"common"`; if set to `false`, or an otherwise falsy value, disables access-logging entirely.| +|`pipService`|*yes*||full url to the pip service to be used for coarse reverse queries. if missing, which is not recommended, the service will default to using nearby lookups instead of point-in-polygon.| + ## Contributing From a5370e0738603b63ce4a57bfb4402ea4e7702de5 Mon Sep 17 00:00:00 2001 From: Diana Shkolnikov Date: Tue, 9 May 2017 12:49:00 -0400 Subject: [PATCH 2/3] add an example --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index eeebd7e2..03f99b1c 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ The API recognizes the following properties under the top-level `api` key in you |---|---|---|---| |`host`|*yes*||specifies the url under which the http service is to run| |`textAnalyzer`|*yes*|*addressit*|can be either `libpostal` or `addressit` however will soon be deprecated and only `libpostal` will be supported going forward| +|`indexName`|*no*|*pelias*|name of the Elasticsearch index to be used when building queries| |`legacyUrl`|*no*||the url to redirect to in case the user does not specify a version such as `v1` |`relativeScores`|*no*|true|if set to true, confidence scores will be normalized, realistically at this point setting this to false is not tested or desirable |`accessLog`|*no*||name of the format to use for access logs; may be any one of the @@ -48,6 +49,41 @@ The API recognizes the following properties under the top-level `api` key in you `"common"`; if set to `false`, or an otherwise falsy value, disables access-logging entirely.| |`pipService`|*yes*||full url to the pip service to be used for coarse reverse queries. if missing, which is not recommended, the service will default to using nearby lookups instead of point-in-polygon.| +Example configuration file would look something like this: + +``` +{ + "esclient": { + "keepAlive": true, + "requestTimeout": "1200000", + "hosts": [ + { + "protocol": "http", + "host": "somesemachine.elb.amazonaws.com", + "port": 9200 + } + ] + }, + "api": { + "host": "localhost:3100/v1/", + "indexName": "foobar", + "legacyUrl": "pelias.mapzen.com", + "relativeScores": true, + "textAnalyzer": "libpostal", + "pipService": "http://mypipservice.com/3000" + }, + "interpolation": { + "client": { + "adapter": "http", + "host": "internal-pelias-interpolation-dev-130430937.us-east-1.elb.amazonaws.com" + } + }, + "logger": { + "level": "debug" + } +} +``` + ## Contributing From a660d7e72f6bd2c906eba57805287db8d55ba783 Mon Sep 17 00:00:00 2001 From: Diana Shkolnikov Date: Tue, 9 May 2017 12:50:54 -0400 Subject: [PATCH 3/3] textAnalyzer not required --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03f99b1c..6f4a1fa6 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The API recognizes the following properties under the top-level `api` key in you |parameter|required|default|description| |---|---|---|---| |`host`|*yes*||specifies the url under which the http service is to run| -|`textAnalyzer`|*yes*|*addressit*|can be either `libpostal` or `addressit` however will soon be deprecated and only `libpostal` will be supported going forward| +|`textAnalyzer`|*no*|*addressit*|can be either `libpostal` or `addressit` however will soon be **deprecated** and only `libpostal` will be supported going forward| |`indexName`|*no*|*pelias*|name of the Elasticsearch index to be used when building queries| |`legacyUrl`|*no*||the url to redirect to in case the user does not specify a version such as `v1` |`relativeScores`|*no*|true|if set to true, confidence scores will be normalized, realistically at this point setting this to false is not tested or desirable