Documentation ¶
Overview ¶
Package document provides methods for updating a single Who's On First document for indexing in Elasticsearch.
Note: One of the things you'll see in the code that makes up the `document` package is stuff like this:
for k, v := range to_assign { path := k if props_rsp.Exists() { path = fmt.Sprintf("properties.%s", k) } body, err = sjson.SetBytes(body, path, v) ... }
This is code to account for the fact that a record may be a "spelunker v1" document in which case it will be a simple hash map, equivalent to a GeoJSON properties dictionary, rather than a complete GeoJSON document.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendSpelunkerV1Properties ¶
AppendSpelunkerV1Properties appends properties specific to the v1" Elasticsearch (v2.x) schema to a Who's On First document for. For details please consult: https://github.com/whosonfirst/es-whosonfirst-schema/tree/master/schema/2.4
func PrepareSpelunkerV1Document ¶
PrepareSpelunkerV1Document prepares a Who's On First document for indexing with the "v1" Elasticsearch (v2.x) schema. For details please consult: https://github.com/whosonfirst/es-whosonfirst-schema/tree/master/schema/2.4