[DOCS] review comment fixes

This commit is contained in:
Zachary Tong 2015-04-27 14:40:04 -04:00
parent 935144a064
commit bf9739d0f0
16 changed files with 10 additions and 6 deletions

View File

@ -125,7 +125,7 @@ experimental[]
Reducer aggregations work on the outputs produced from other aggregations rather than from document sets, adding
information to the output tree. There are many different types of reducer, each computing different information from
other aggregations, but these type can broken down into two families:
other aggregations, but these types can broken down into two families:
_Parent_::
A family of reducer aggregations that is provided with the output of its parent aggregation and is able

View File

@ -1,4 +1,5 @@
[[search-aggregations-reducer]]
include::reducer/derivative.asciidoc[]
include::reducer/max-bucket-aggregation.asciidoc[]
include::reducer/movavg-reducer.asciidoc[]

View File

@ -13,7 +13,8 @@ The following snippet calculates the derivative of the total monthly `sales`:
"sales_per_month" : {
"date_histogram" : {
"field" : "date",
"interval" : "month"
"interval" : "month",
"min_doc_count" : 0
},
"aggs": {
"sales": {
@ -64,7 +65,7 @@ And the following may be the response:
{
"key_as_string": "2015/03/01 00:00:00",
"key": 1425168000000,
"doc_count": 2,
"doc_count": 2, <3>
"sales": {
"value": 375
},
@ -81,6 +82,7 @@ And the following may be the response:
<1> No derivative for the first bucket since we need at least 2 data points to calculate the derivative
<2> Derivative value units are implicitly defined by the `sales` aggregation and the parent histogram so in this case the units
would be $/month assuming the `price` field has units of $.
<3> The number of documents in the bucket are represented by the `doc_count` value
==== Second Order Derivative
@ -179,7 +181,7 @@ There are a couple of reasons why the data output by the enclosing histogram may
on the enclosing histogram or with a query matching only a small number of documents)
Where there is no data available in a bucket for a given metric it presents a problem for calculating the derivative value for both
the current bucket and the next bucket. In the derivative reducer aggregation has a `gap policy` parameter to define what the behavior
the current bucket and the next bucket. In the derivative reducer aggregation has a `gap_policy` parameter to define what the behavior
should be when a gap in the data is found. There are currently two options for controlling the gap policy:
_ignore_::

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -34,7 +34,7 @@ The following snippet calculates the maximum of the total monthly `sales`:
--------------------------------------------------
<1> `bucket_paths` instructs this max_bucket aggregation that we want the maximum value of the `sales` aggregation in the
"sales_per_month` date histogram.
`sales_per_month` date histogram.
And the following may be the response:

View File

@ -71,7 +71,7 @@ embedded like any other metric aggregation:
<1> A `date_histogram` named "my_date_histo" is constructed on the "timestamp" field, with one-day intervals
<2> We must specify "min_doc_count: 0" in our date histogram that all buckets are returned, even if they are empty.
<3> A `sum` metric is used to calculate the sum of a field. This could be any metric (sum, min, max, etc)
<4> Finally, we specify a `moving_avg` aggregation which uses "the_sum" metric as it's input.
<4> Finally, we specify a `moving_avg` aggregation which uses "the_sum" metric as its input.
Moving averages are built by first specifying a `histogram` or `date_histogram` over a field. You can then optionally
add normal metrics, such as a `sum`, inside of that histogram. Finally, the `moving_avg` is embedded inside the histogram.
@ -121,6 +121,7 @@ the values from a `simple` moving average tend to "lag" behind the real data.
"buckets_path": "the_sum",
"model" : "simple"
}
}
}
--------------------------------------------------