Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Please note that Elasticsearch will ignore the choice of execution hint if it is

==== Limitations

[[div-sampler-breadth-first-nested-agg]]
===== Cannot be nested under `breadth_first` aggregations
Being a quality-based filter the diversified_sampler aggregation needs access to the relevance score produced for each document.
It therefore cannot be nested under a `terms` aggregation which has the `collect_mode` switched from the default `depth_first` mode to `breadth_first` as this discards scores.
Expand All @@ -194,6 +195,7 @@ In this situation an error will be thrown.
===== Limited de-dup logic.
The de-duplication logic applies only at a shard level so will not apply across shards.

[[spec-syntax-geo-date-fields]]
===== No specialized syntax for geo/date fields
Currently the syntax for defining the diversifying values is defined by a choice of `field` or
`script` - there is no added syntactical sugar for expressing geo or date units such as "7d" (7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ request. The response for this example would be:
// TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/]
// TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/]

[[other-bucket]]
==== `Other` Bucket

The `other_bucket` parameter can be set to add a bucket to the response which will contain all documents that do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ The default value is 100.

==== Limitations

[[sampler-breadth-first-nested-agg]]
===== Cannot be nested under `breadth_first` aggregations
Being a quality-based filter the sampler aggregation needs access to the relevance score produced for each document.
It therefore cannot be nested under a `terms` aggregation which has the `collect_mode` switched from the default `depth_first` mode to `breadth_first` as this discards scores.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ Available parameters in the script are
`_subset_size`:: Number of documents in the subset.
`_superset_size`:: Number of documents in the superset.

[[sig-terms-shard-size]]
===== Size & Shard Size

The `size` parameter can be set to define how many term buckets should be returned out of the overall terms list. By
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ It only occurs 5 times in our index as a whole (see the `bg_count`) and yet 4 of
were lucky enough to appear in our 100 document sample of "bird flu" results. That suggests
a significant word and one which the user can potentially add to their search.


[[filter-duplicate-text-noisy-data]]
==== Dealing with noisy data using `filter_duplicate_text`
Free-text fields often contain a mix of original content and mechanical copies of text (cut-and-paste biographies, email reply chains,
retweets, boilerplate headers/footers, page navigation menus, sidebar news links, copyright notices, standard disclaimers, addresses).
Expand Down Expand Up @@ -353,7 +353,7 @@ However, the `size` and `shard size` settings covered in the next section provid

This aggregation supports the same scoring heuristics (JLH, mutual_information, gnd, chi_square etc) as the <<search-aggregations-bucket-significantterms-aggregation,significant terms>> aggregation


[[sig-text-shard-size]]
===== Size & Shard Size

The `size` parameter can be set to define how many term buckets should be returned out of the overall terms list. By
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ As a formula, a weighted average is the `∑(value * weight) / ∑(weight)`

A regular average can be thought of as a weighted average where every value has an implicit weight of `1`.

[[weighted-avg-params]]
.`weighted_avg` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`value` | The configuration for the field or script that provides the values |Required |
Expand All @@ -23,15 +25,19 @@ A regular average can be thought of as a weighted average where every value has

The `value` and `weight` objects have per-field specific configuration:

[[value-params]]
.`value` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`field` | The field that values should be extracted from |Required |
|`missing` | A value to use if the field is missing entirely |Optional |
|`script` | A script which provides the values for the document. This is mutually exclusive with `field` |Optional
|===

[[weight-params]]
.`weight` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`field` | The field that weights should be extracted from |Required |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
A sibling pipeline aggregation which calculates the (mean) average value of a specified metric in a sibling aggregation.
The specified metric must be numeric and the sibling aggregation must be a multi-bucket aggregation.

[[avg-bucket-agg-syntax]]
==== Syntax

An `avg_bucket` aggregation looks like this in isolation:
Expand All @@ -18,7 +19,9 @@ An `avg_bucket` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[avg-bucket-params]]
.`avg_bucket` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to find the average for (see <<buckets-path-syntax>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
A parent pipeline aggregation which executes a script which can perform per bucket computations on specified metrics
in the parent multi-bucket aggregation. The specified metric must be numeric and the script must return a numeric value.

[[bucket-script-agg-syntax]]
==== Syntax

A `bucket_script` aggregation looks like this in isolation:
Expand All @@ -24,8 +25,9 @@ A `bucket_script` aggregation looks like this in isolation:
<1> Here, `my_var1` is the name of the variable for this buckets path to use in the script, `the_sum` is the path to
the metrics to use for that variable.


[[bucket-script-params]]
.`bucket_script` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`script` |The script to run for this aggregation. The script can be inline, file or indexed. (see <<modules-scripting>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ A `bucket_selector` aggregation looks like this in isolation:
<1> Here, `my_var1` is the name of the variable for this buckets path to use in the script, `the_sum` is the path to
the metrics to use for that variable.


[[bucket-selector-params]]
.`bucket_selector` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`script` |The script to run for this aggregation. The script can be inline, file or indexed. (see <<modules-scripting>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ A `bucket_sort` aggregation looks like this in isolation:
<1> Here, `sort_field_1` is the bucket path to the variable to be used as the primary sort and its order
is ascending.

[[bucket-sort-params]]
.`bucket_sort` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`sort` |The list of fields to sort on. See <<search-request-sort,`sort`>> for more details. |Optional |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ A `cumulative_sum` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[cumulative-sum-params]]
.`cumulative_sum` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to find the cumulative sum for (see <<buckets-path-syntax>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ A `derivative` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[derivative-params]]
.`derivative` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to find the derivative for (see <<buckets-path-syntax>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ A `extended_stats_bucket` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[extended-stats-bucket-params]]
.`extended_stats_bucket` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to calculate stats for (see <<buckets-path-syntax>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ A `max_bucket` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[max-bucket-params]]
.`max_bucket` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to find the maximum for (see <<buckets-path-syntax>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ A `min_bucket` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[min-bucket-params]]
.`min_bucket` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to find the minimum for (see <<buckets-path-syntax>> for more
Expand Down
20 changes: 20 additions & 0 deletions docs/reference/aggregations/pipeline/movfn-aggregation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ A `moving_fn` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[moving-avg-params]]
.`moving_avg` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |Path to the metric of interest (see <<buckets-path-syntax, `buckets_path` Syntax>> for more details |Required |
Expand Down Expand Up @@ -188,7 +190,9 @@ The functions are available from the `MovingFunctions` namespace. E.g. `MovingF
This function accepts a collection of doubles and returns the maximum value in that window. `null` and `NaN` values are ignored; the maximum
is only calculated over the real values. If the window is empty, or all values are `null`/`NaN`, `NaN` is returned as the result.

[[max-params]]
.`max(double[] values)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the maximum
Expand Down Expand Up @@ -229,7 +233,9 @@ POST /_search
This function accepts a collection of doubles and returns the minimum value in that window. `null` and `NaN` values are ignored; the minimum
is only calculated over the real values. If the window is empty, or all values are `null`/`NaN`, `NaN` is returned as the result.

[[min-params]]
.`min(double[] values)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the minimum
Expand Down Expand Up @@ -270,7 +276,9 @@ POST /_search
This function accepts a collection of doubles and returns the sum of the values in that window. `null` and `NaN` values are ignored;
the sum is only calculated over the real values. If the window is empty, or all values are `null`/`NaN`, `0.0` is returned as the result.

[[sum-params]]
.`sum(double[] values)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the sum of
Expand Down Expand Up @@ -312,7 +320,9 @@ This function accepts a collection of doubles and average, then returns the stan
`null` and `NaN` values are ignored; the sum is only calculated over the real values. If the window is empty, or all values are
`null`/`NaN`, `0.0` is returned as the result.

[[stddev-params]]
.`stdDev(double[] values)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the standard deviation of
Expand Down Expand Up @@ -363,7 +373,9 @@ the values from a `simple` moving average tend to "lag" behind the real data.
`null`/`NaN`, `NaN` is returned as the result. This means that the count used in the average calculation is count of non-`null`,non-`NaN`
values.

[[unweightedavg-params]]
.`unweightedAvg(double[] values)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the sum of
Expand Down Expand Up @@ -407,7 +419,9 @@ the "lag" behind the data's mean, since older points have less influence.

If the window is empty, or all values are `null`/`NaN`, `NaN` is returned as the result.

[[linearweightedavg-params]]
.`linearWeightedAvg(double[] values)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the sum of
Expand Down Expand Up @@ -456,7 +470,9 @@ moving average. This tends to make the moving average track the data more close
`null`/`NaN`, `NaN` is returned as the result. This means that the count used in the average calculation is count of non-`null`,non-`NaN`
values.

[[ewma-params]]
.`ewma(double[] values, double alpha)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the sum of
Expand Down Expand Up @@ -511,7 +527,9 @@ Values are produced by multiplying the level and trend components.
`null`/`NaN`, `NaN` is returned as the result. This means that the count used in the average calculation is count of non-`null`,non-`NaN`
values.

[[holt-params]]
.`holt(double[] values, double alpha)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the sum of
Expand Down Expand Up @@ -572,7 +590,9 @@ for future enhancements.
`null`/`NaN`, `NaN` is returned as the result. This means that the count used in the average calculation is count of non-`null`,non-`NaN`
values.

[[holtwinters-params]]
.`holtWinters(double[] values, double alpha)` Parameters
[options="header"]
|===
|Parameter Name |Description
|`values` |The window of values to find the sum of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ A `percentiles_bucket` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[percentiles-bucket-params]]
.`percentiles_bucket` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to find the percentiles for (see <<buckets-path-syntax>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ A `serial_diff` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[serial-diff-params]]
.`serial_diff` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |Path to the metric of interest (see <<buckets-path-syntax, `buckets_path` Syntax>> for more details |Required |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ A `stats_bucket` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[stats-bucket-params]]
.`stats_bucket` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to calculate stats for (see <<buckets-path-syntax>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ A `sum_bucket` aggregation looks like this in isolation:
--------------------------------------------------
// NOTCONSOLE

[[sum-bucket-params]]
.`sum_bucket` Parameters
[options="header"]
|===
|Parameter Name |Description |Required |Default Value
|`buckets_path` |The path to the buckets we wish to find the sum for (see <<buckets-path-syntax>> for more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ set to `false` no mapping would get added as when `expand=false` the target mapp
stop word.

[float]
[[synonym-graph-tokenizer-ignore_case-deprecated]]
==== `tokenizer` and `ignore_case` are deprecated

The `tokenizer` parameter controls the tokenizers that will be used to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ stop word.


[float]
[[synonym-tokenizer-ignore_case-deprecated]]
==== `tokenizer` and `ignore_case` are deprecated

The `tokenizer` parameter controls the tokenizers that will be used to
Expand Down
1 change: 1 addition & 0 deletions docs/reference/docs/refresh.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ general, if you have a running system you don't wish to disturb then
`refresh=wait_for` is a smaller modification.

[float]
[[refresh_wait_for-force-refresh]]
=== `refresh=wait_for` Can Force a Refresh

If a `refresh=wait_for` request comes in when there are already
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/docs/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ POST test/_update/1
// TEST[continued]

[float]
[[scripted_upsert]]
==== `scripted_upsert`

If you would like your script to run regardless of whether the document exists
Expand Down Expand Up @@ -272,6 +273,7 @@ POST sessions/_update/dh3sgudg8gsrgl
// TEST[continued]

[float]
[[doc_as_upsert]]
==== `doc_as_upsert`

Instead of sending a partial `doc` plus an `upsert` doc, setting
Expand Down
1 change: 1 addition & 0 deletions docs/reference/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ This REST access pattern is so pervasive throughout all the API commands that if
Elasticsearch provides data manipulation and search capabilities in near real time. By default, you can expect a one second delay (refresh interval) from the time you index/update/delete your data until the time that it appears in your search results. This is an important distinction from other platforms like SQL wherein data is immediately available after a transaction is completed.

[float]
[[indexing-replacing-documents]]
=== Indexing/Replacing Documents

We've previously seen how we can index a single document. Let's recall that command again:
Expand Down
Loading