Browse Source

add an example

pull/883/head
Diana Shkolnikov 8 years ago committed by GitHub
parent
commit
a5370e0738
  1. 36
      README.md

36
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

Loading…
Cancel
Save