Browse Source

Remove redundant parameter documentation.

DOCS.md
	-Rather than repeating parameter documentation verbatim for
	similar endpoints, simply reference the related endpoints.
pull/126/head
Severyn Kozak 10 years ago
parent
commit
a921961c7d
  1. 67
      DOCS.md

67
DOCS.md

@ -1,21 +1,20 @@
## /search ## /search
Full text search endpoint which queries the elasticsearch doc store, slightly slower than suggest. The full text search endpoint that matches the name of a place to points on the planet.
#### Required Parameters #### Required Parameters
* **input**: query string * **input**: the string to search for (eg `new york city` or `london`)
#### Optional Parameters #### Optional Parameters
* **lat**: latitude * **lat**, **lon**: the latitude/longitude coordinates to bias search results towards (may increase relevancy)
* **lon**: longitude
* **zoom**: zoom level from which you wish to view the world * **zoom**: zoom level from which you wish to view the world
* **size**: number of results requested (defaults to 10) * **size**: number of results requested (defaults to 10)
* **layers**: datasets you wish to query (defaults to `poi,admin,address`). * **layers**: the datasets you wish to query (defaults to `poi,admin,address`). Valid values are:
* valid values are `poi`, `admin` or `address` * aliases for multiple datasets like `poi`, `admin` or `address`
* `poi` expands internally to `geoname`, `osmnode`, `osmway` * `poi` expands internally to `geoname`, `osmnode`, `osmway`
* `admin` expands to `admin0`, `admin1`, `admin2`, `neighborhood`, `locality`, `local_admin` * `admin` expands to `admin0`, `admin1`, `admin2`, `neighborhood`, `locality`, `local_admin`
* `address` expands to `osmaddress`, `openaddresses` * `address` expands to `osmaddress`, `openaddresses`
* can also be specific to one particular dataset, for example `geoname` * the name of one particular dataset, like `geoname` or `osmaddress`
* **bbox**: the bounding box from which you want all your results to come * **bbox**: the bounding box from which you want all your results to come
* can be one of the following comma separated string values * can be one of the following comma separated string values
* "southwest_lng,southwest_lat,northeast_lng,northeast_lat" `L.latLngBounds(southwestLatLng, northeastLatLng).toBBoxString()` * "southwest_lng,southwest_lat,northeast_lng,northeast_lat" `L.latLngBounds(southwestLatLng, northeastLatLng).toBBoxString()`
@ -30,29 +29,24 @@ Full text search endpoint which queries the elasticsearch doc store, slightly sl
## /search/coarse ## /search/coarse
This is a coarse forward geocoder endpoint which only searches admin dataset layers. This is a coarse forward geocoder endpoint which only searches admin dataset layers.
Like the `/search` endpoint, but performs a "coarse" search, meaning that it only searches administrative regions
(countries, states, counties, neighborhoods, etc.).
#### Required Parameters #### Required Parameters
* **input**: query string Same as `/search`.
#### Optional Parameters #### Optional Parameters
* **lat**: latitude Same as `/search`.
* **lon**: longitude
* **zoom**: zoom level from which you wish to view the world
* **bbox**: the bounding box frome which you want all your results to come
* **size**: (defaults to 10)
* **layers**: (defaults to `admin`)
* **details**: (defaults to `true`)
## /suggest ## /suggest
The autocomplete endpoint, it offers fast response time. Mixes results from around the provided lat/lon and also from precision level 1 and 3. The autocompletion endpoint that offers very fast response times; ideal for completing partial user input. Mixes
results from around the provided lat/lon coordinates and also from precision level 1 and 3.
#### Required Parameters #### Required Parameters
* **input**: query string * **input**: query string
* **lat**: latitude * **lat**, **lon**: The latitude/longitude coordinates to bias results towards.
* **lon**: longitude * lat/lon are currently **required** because of this [open issue](https://github.com/elasticsearch/elasticsearch/issues/6444)
* lat/lon are **required** currently because of this [open issue](https://github.com/elasticsearch/elasticsearch/issues/6444)
#### Optional Parameters #### Optional Parameters
* **zoom**: zoom level from which you wish to view the world * **zoom**: zoom level from which you wish to view the world
@ -60,48 +54,35 @@ The autocomplete endpoint, it offers fast response time. Mixes results from arou
* **layers**: datasets you wish to query (defaults to `poi,admin,address`) * **layers**: datasets you wish to query (defaults to `poi,admin,address`)
* **details**: (defaults to `true`) * **details**: (defaults to `true`)
## /suggest/coarse ## /suggest/coarse
Only queries the admin layers. Only queries the admin layers.
#### Required Parameters #### Required Parameters
* **input**: query string Same as `/suggest`.
* **lat**: latitude from where you are searching
* **lon**: longitude
* lat/lon are **required** currently because of this [open issue](https://github.com/elasticsearch/elasticsearch/issues/6444)
#### Optional Parameters #### Optional Parameters
* **zoom**: zoom level from which you wish to view the world Same as `/suggest`.
* **size**: number of results requested (defaults to 10)
* **layers**: datasets you wish to query (defaults to `admin`)
* **details**: (defaults to `true`)
## /suggest/nearby ## /suggest/nearby
Works as autocomplete for places located near a latitude/longitude, this endpoint is the same as `/suggest` but the results are all from within 50 kilometers of the specified point. Unlike `/suggest`, `/suggest/nearby` does not mix results from different precision levels (500km, 1000km etc from lat/lon). Works as autocomplete for only the places located near a latitude/longitude; this endpoint is the same as `/suggest`
but the results are all from within 50 kilometers of the specified point. Unlike `/suggest`, `/suggest/nearby` does
not mix results from different precision levels (500km, 1000km etc from lat/lon).
#### Required Parameters #### Required Parameters
* **input**: query string Same as `/suggest`.
* **lat**: latitude
* **lon**: longitude
* lat/lon are **required** currently because of this [open issue](https://github.com/elasticsearch/elasticsearch/issues/6444)
#### Optional Parameters #### Optional Parameters
* **zoom**: zoom level from which you wish to view the world Same as `/suggest`.
* **size**: number of results you need (defaults to 10)
* **layers**: datasets you wish to query (defaults to `poi,admin,address`)
* **details**: (defaults to `true`)
## /reverse ## /reverse
Reverse geocoding endpoint. The reverse geocoding endpoint; matches a point on the planet to the name of that place.
#### Required Parameters #### Required Parameters
* **lat**: latitude * **lat**, **lon**: The coordinates of the point.
* **lon**: longitude
#### Optional Parameters #### Optional Parameters
* **zoom**: zoom level from which you wish to view the world * **zoom**: zoom level from which you wish to view the world
@ -112,7 +93,7 @@ Reverse geocoding endpoint.
## /doc ## /doc
Retrieves a document or multiple documents at once. The endpoint for retrieving one or more elasticsearch documents with specific ids.
#### Required Parameters #### Required Parameters
* one of **id** or **ids** * one of **id** or **ids**

Loading…
Cancel
Save