elasticsearch/docs/reference
Tal Levy b514d9bf2e
Add geo_line aggregation (#41612)
A metric aggregation that aggregates a set of points as 
a GeoJSON LineString ordered by some sort parameter.

#### specifics

A `geo_line` aggregation request would specify a `geo_point` field, as well
as a `sort` field. `geo_point` represents the values used in the LineString, 
while the `sort` values will be used as the total ordering of the points.

the `sort` field would support any numeric field, including date.

#### sample usage

```
{
	"query": {
		"bool": {
			"must": [
				{ "term": { "person": "004" } },
				{ "term": { "trajectory": "20090131002206.plt" } }
			]
		}
	},
	"aggs": {
		"make_line": {
			"geo_line": {
				"point": {"field": "location"},
				"sort": { "field": "timestamp" },
                                "include_sort": true,
                                "sort_order": "desc",
                                "size": 15
			}
		}
	}
}
```

#### sample response

```
{
    "took": 21,
    "timed_out": false,
    "_shards": {...},
    "hits": {...},
    "aggregations": {
        "make_line": {
            "type": "LineString",
            "coordinates": [
                [
                    121.52926194481552,
                    38.92878997139633
                ],
                [
                    121.52922699227929,
                    38.92876998055726
                ],
             ]
        }
    }
}
```

#### visual response

<img width="540" alt="Screen Shot 2019-04-26 at 9 40 07 AM" src="https://user-images.githubusercontent.com/388837/56834977-cf278e00-6827-11e9-9c93-005ed48433cc.png">

#### limitations

Due to the cardinality of points, an initial max of 10k points 
will be used. This should support many use-cases.

One solution to overcome this limitation is to keep a PriorityQueue of
points, and simplifying the line once it hits this max. If simplifying
makes sense, it may be a nice option, in general. The ability to use a parameter
to specify how aggressive one wants to simplify. This parameter could be 
the number of points. Example algorithm one could use with a PriorityQueue:
https://bost.ocks.org/mike/simplify/. This would still require O(m) space, where m
is the number of points returned. And would also require heapifying triangles
sorted by their areas, which would be O(log(m)) operations. Since sorting is done, 
anyways, simplifying would still be a O(n log(m)) operation, where n is the total number 
of points to filter........... something to explore


closes #41649
2020-11-23 10:26:27 -08:00
..
aggregations Add geo_line aggregation (#41612) 2020-11-23 10:26:27 -08:00
analysis [DOCS] Fix whitespace in pattern replace token filter docs (#64345) 2020-10-29 10:07:10 -04:00
autoscaling Autoscaling delete policy by simple pattern (#64739) 2020-11-09 15:44:33 +01:00
cat Clarify field data cache behavior in docs (#64375) 2020-11-20 13:53:23 -08:00
ccr Add data stream support to CCR (#61993) 2020-11-03 14:01:14 +01:00
cluster Clarify field data cache behavior in docs (#64375) 2020-11-20 13:53:23 -08:00
commands [DOCS] Fix elasticsearch-croneval chunking (#63008) 2020-09-29 09:53:20 -04:00
data-streams Fix links to Fleet overview (#65174) 2020-11-18 10:26:04 -08:00
docs Fix links to Fleet overview (#65174) 2020-11-18 10:26:04 -08:00
eql [DOCS] EQL: Add wildcard support to `:` operator (#65237) 2020-11-19 08:26:13 -05:00
graph [DOCS] Document `xpack.graph.enabled` setting (#60073) 2020-08-21 12:37:05 -04:00
high-availability [DOCS] Fix "the the" typos (#64344) 2020-10-29 10:11:58 -04:00
how-to Clarify field data cache behavior in docs (#64375) 2020-11-20 13:53:23 -08:00
ilm [DOCS] ILM: Add alloc ex with multiple node attributes (#65266) 2020-11-19 12:17:10 -05:00
images [DOCS] Move Kibana index mgmt docs to ES (#64380) 2020-10-30 09:14:52 -04:00
index-modules Fix Allocation `include` Filter Docs (#65202) 2020-11-18 17:59:59 +01:00
indices [DOCS] Document get data stream API's _meta prop (#65221) 2020-11-19 09:51:03 -05:00
ingest [DOCS] Document get pipeline API as multi-target (#64816) 2020-11-09 16:11:13 -05:00
licensing [DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04:00
mapping Clarify field data cache behavior in docs (#64375) 2020-11-20 13:53:23 -08:00
migration Remove the deprecated local parameter for _cat/indices (#64868) 2020-11-16 07:53:16 -06:00
ml [DOCS] Fixes typo in Aggregating data for faster performance. (#65354) 2020-11-23 12:44:59 +01:00
modules Clarify field data cache behavior in docs (#64375) 2020-11-20 13:53:23 -08:00
monitoring [DOCS] Add monitoring note (#61793) 2020-10-16 13:56:54 -07:00
query-dsl [DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04:00
release-notes [DOCS] Swap `[float]` for `[discrete]` (#60124) 2020-07-23 11:48:22 -04:00
repositories-metering-api [DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04:00
rest-api [DOCS] Make system & hidden index info more prominent. (#64839) 2020-11-11 10:35:02 -08:00
rollup [DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04:00
scripting [DOCS] Fix ingest script compilation rate and cache size (#61468) 2020-08-24 10:26:38 -04:00
search [DOCS] Fix formatting issue in search explain docs (#65303) 2020-11-20 09:01:01 -05:00
searchable-snapshots [DOCS] Add searchable snapshots topic. (#63040) 2020-10-22 14:34:32 -07:00
settings [DOCS] Document `xpack.http.proxy.scheme` setting (#65264) 2020-11-19 15:31:24 -05:00
setup Add snapshots to important config list (#65338) 2020-11-23 14:26:07 +00:00
slm Document Recommended Maximum Repository Size in SLM Docs (#64485) 2020-11-02 17:20:20 +01:00
snapshot-restore [DOCS] Add note about NFS repositories (#65149) 2020-11-17 14:21:18 -05:00
sql SQL: Remove constant_keyword from SQL docs (#64709) 2020-11-06 20:07:30 +01:00
tab-widgets [DOCS] Improve docs for Windows DOS/UNC paths in `path.*` settings (#64668) 2020-11-09 10:36:48 -05:00
transform [DOCS] Fixes 'the the' typo in transforms docs. (#64393) 2020-10-30 10:52:35 +01:00
upgrade [DOCS] Note remote reindex is not fwd compatible (#60425) 2020-07-30 09:08:59 -04:00
vectors [DOCS] Update my-index examples (#60132) 2020-07-27 14:46:39 -04:00
aggregations.asciidoc [DOCS] Rewrite aggs overview (#64318) 2020-10-30 08:39:38 -04:00
analysis.asciidoc [DOCS] Swap `[float]` for `[discrete]` (#60124) 2020-07-23 11:48:22 -04:00
api-conventions.asciidoc [DOCS] Make system & hidden index info more prominent. (#64839) 2020-11-11 10:35:02 -08:00
cat.asciidoc AwaitsFix for #51619 2020-08-06 09:59:56 +01:00
cluster.asciidoc
data-management.asciidoc [DOCS] Move Kibana index mgmt docs to ES (#64380) 2020-10-30 09:14:52 -04:00
data-rollup-transform.asciidoc
datatiers.asciidoc [DOCS] Add top-level Data management section. (#64185) 2020-10-28 15:38:22 -07:00
docs.asciidoc
frozen-indices.asciidoc [DOCS] Replace `twitter` dataset in docs (#60604) 2020-08-03 12:49:56 -04:00
getting-started.asciidoc [DOCS] Swap `[float]` for `[discrete]` (#60124) 2020-07-23 11:48:22 -04:00
glossary.asciidoc [DOCS] Add system & hidden indices definitions. (#64834) 2020-11-10 13:03:14 -08:00
gs-index.asciidoc
high-availability.asciidoc
how-to.asciidoc [DOCS] Document shard sizing guide (#61942) 2020-09-28 09:24:40 -04:00
index-extra-title-page.html
index-modules.asciidoc [DOCS] Update CCR docs to focus on Kibana (#60555) 2020-08-17 15:36:54 -04:00
index.asciidoc [DOCS] Add top-level Data management section. (#64185) 2020-10-28 15:38:22 -07:00
index.x.asciidoc
indices.asciidoc [DOCS] Split delete index template API docs (#62074) (#62168) 2020-09-09 10:13:13 -04:00
ingest.asciidoc [DOCS] Update my-index examples (#60132) 2020-07-27 14:46:39 -04:00
intro.asciidoc [DOCS] Fix hyphenation for "time series" (#61472) 2020-08-24 10:34:41 -04:00
links.asciidoc [DOCS] Fix security links in machine learning APIs (#60098) 2020-07-23 12:14:56 -07:00
mapping.asciidoc Remove a redundant section on field data types. (#61821) 2020-09-02 15:00:01 -07:00
query-dsl.asciidoc [DOCS] Add redirects for wildcard and constant keyword (#61815) 2020-09-01 15:32:35 -04:00
redirects.asciidoc Clarify field data cache behavior in docs (#64375) 2020-11-20 13:53:23 -08:00
release-notes.asciidoc
scripting.asciidoc [DOCS] Swap `[float]` for `[discrete]` (#60124) 2020-07-23 11:48:22 -04:00
search.asciidoc [DOCS] Display point in time API docs (#61527) 2020-08-25 11:03:41 -04:00
setup.asciidoc [DOCS] http -> https, remove outdated plugin docs (#60380) 2020-07-31 15:58:38 -04:00
upgrade.asciidoc