|
@@ -16,6 +16,7 @@ experimental[]
|
|
|
|
|
|
`PUT _ml/data_frame/analytics/<data_frame_analytics_id>`
|
|
|
|
|
|
+
|
|
|
[[ml-put-dfanalytics-prereq]]
|
|
|
==== {api-prereq-title}
|
|
|
|
|
@@ -25,6 +26,7 @@ also have `read` and `view_index_metadata` privileges on the source index and
|
|
|
more information, see {stack-ov}/security-privileges.html[Security privileges]
|
|
|
and {stack-ov}/built-in-roles.html[Built-in roles].
|
|
|
|
|
|
+
|
|
|
[[ml-put-dfanalytics-desc]]
|
|
|
==== {api-description-title}
|
|
|
|
|
@@ -45,6 +47,7 @@ If the destination index already exists, then it will be use as is. This makes
|
|
|
it possible to set up the destination index in advance with custom settings
|
|
|
and mappings.
|
|
|
|
|
|
+
|
|
|
[[ml-put-dfanalytics-path-params]]
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
@@ -54,6 +57,7 @@ and mappings.
|
|
|
characters (a-z and 0-9), hyphens, and underscores. It must start and end with
|
|
|
alphanumeric characters.
|
|
|
|
|
|
+
|
|
|
[[ml-put-dfanalytics-request-body]]
|
|
|
==== {api-request-body-title}
|
|
|
|
|
@@ -62,17 +66,32 @@ and mappings.
|
|
|
index. For example: `outlier_detection`. See <<dfanalytics-types>>.
|
|
|
|
|
|
`analyzed_fields`::
|
|
|
- (Optional, object) You can specify both `includes` and/or `excludes` patterns. If
|
|
|
- `analyzed_fields` is not set, only the relevant fields will be included. For
|
|
|
- example, all the numeric fields for {oldetection}.
|
|
|
+ (Optional, object) You can specify both `includes` and/or `excludes` patterns.
|
|
|
+ If `analyzed_fields` is not set, only the relevant fields will be included.
|
|
|
+ For example, all the numeric fields for {oldetection}.
|
|
|
+
|
|
|
+ `analyzed_fields.includes`:::
|
|
|
+ (Optional, array) An array of strings that defines the fields that will be
|
|
|
+ included in the analysis.
|
|
|
+
|
|
|
+ `analyzed_fields.excludes`:::
|
|
|
+ (Optional, array) An array of strings that defines the fields that will be
|
|
|
+ excluded from the analysis.
|
|
|
|
|
|
`description`::
|
|
|
(Optional, string) A description of the job.
|
|
|
|
|
|
`dest`::
|
|
|
(Required, object) The destination configuration, consisting of `index` and
|
|
|
- optionally `results_field` (`ml` by default). See
|
|
|
- <<ml-dfanalytics-properties,{dfanalytics} properties>>.
|
|
|
+ optionally `results_field` (`ml` by default).
|
|
|
+
|
|
|
+ `index`:::
|
|
|
+ (Required, string) Defines the _destination index_ to store the results of
|
|
|
+ the {dfanalytics-job}.
|
|
|
+
|
|
|
+ `results_field`:::
|
|
|
+ (Optional, string) Defines the name of the field in which to store the
|
|
|
+ results of the analysis. Default to `ml`.
|
|
|
|
|
|
`model_memory_limit`::
|
|
|
(Optional, string) The approximate maximum amount of memory resources that are
|
|
@@ -84,8 +103,20 @@ and mappings.
|
|
|
|
|
|
`source`::
|
|
|
(Required, object) The source configuration, consisting of `index` and
|
|
|
- optionally a `query`. See
|
|
|
- <<ml-dfanalytics-properties,{dfanalytics} properties>>.
|
|
|
+ optionally a `query`.
|
|
|
+
|
|
|
+ `index`:::
|
|
|
+ (Required, string or array) Index or indices on which to perform the
|
|
|
+ analysis. It can be a single index or index pattern as well as an array of
|
|
|
+ indices or patterns.
|
|
|
+
|
|
|
+ `query`:::
|
|
|
+ (Optional, object) The {es} query domain-specific language
|
|
|
+ (<<query-dsl,DSL>>). This value corresponds to the query object in an {es}
|
|
|
+ search POST body. All the options that are supported by {es} can be used,
|
|
|
+ as this object is passed verbatim to {es}. By default, this property has
|
|
|
+ the following value: `{"match_all": {}}`.
|
|
|
+
|
|
|
|
|
|
[[ml-put-dfanalytics-example]]
|
|
|
==== {api-examples-title}
|
|
@@ -113,6 +144,7 @@ PUT _ml/data_frame/analytics/loganalytics
|
|
|
// CONSOLE
|
|
|
// TEST[setup:setup_logdata]
|
|
|
|
|
|
+
|
|
|
The API returns the following result:
|
|
|
|
|
|
[source,js]
|