@@ -16,6 +16,7 @@ experimental[]
16
16
17
17
`PUT _ml/data_frame/analytics/<data_frame_analytics_id>`
18
18
19
+
19
20
[[ml-put-dfanalytics-prereq]]
20
21
==== {api-prereq-title}
21
22
@@ -25,6 +26,7 @@ also have `read` and `view_index_metadata` privileges on the source index and
25
26
more information, see {stack-ov}/security-privileges.html[Security privileges]
26
27
and {stack-ov}/built-in-roles.html[Built-in roles].
27
28
29
+
28
30
[[ml-put-dfanalytics-desc]]
29
31
==== {api-description-title}
30
32
@@ -45,6 +47,7 @@ If the destination index already exists, then it will be use as is. This makes
45
47
it possible to set up the destination index in advance with custom settings
46
48
and mappings.
47
49
50
+
48
51
[[ml-put-dfanalytics-path-params]]
49
52
==== {api-path-parms-title}
50
53
@@ -54,6 +57,7 @@ and mappings.
54
57
characters (a-z and 0-9), hyphens, and underscores. It must start and end with
55
58
alphanumeric characters.
56
59
60
+
57
61
[[ml-put-dfanalytics-request-body]]
58
62
==== {api-request-body-title}
59
63
@@ -62,17 +66,32 @@ and mappings.
62
66
index. For example: `outlier_detection`. See <<dfanalytics-types>>.
63
67
64
68
`analyzed_fields`::
65
- (Optional, object) You can specify both `includes` and/or `excludes` patterns. If
66
- `analyzed_fields` is not set, only the relevant fields will be included. For
67
- example, all the numeric fields for {oldetection}.
69
+ (Optional, object) You can specify both `includes` and/or `excludes` patterns.
70
+ If `analyzed_fields` is not set, only the relevant fields will be included.
71
+ For example, all the numeric fields for {oldetection}.
72
+
73
+ `analyzed_fields.includes`:::
74
+ (Optional, array) An array of strings that defines the fields that will be
75
+ included in the analysis.
76
+
77
+ `analyzed_fields.excludes`:::
78
+ (Optional, array) An array of strings that defines the fields that will be
79
+ excluded from the analysis.
68
80
69
81
`description`::
70
82
(Optional, string) A description of the job.
71
83
72
84
`dest`::
73
85
(Required, object) The destination configuration, consisting of `index` and
74
- optionally `results_field` (`ml` by default). See
75
- <<ml-dfanalytics-properties,{dfanalytics} properties>>.
86
+ optionally `results_field` (`ml` by default).
87
+
88
+ `index`:::
89
+ (Required, string) Defines the _destination index_ to store the results of
90
+ the {dfanalytics-job}.
91
+
92
+ `results_field`:::
93
+ (Optional, string) Defines the name of the field in which to store the
94
+ results of the analysis. Default to `ml`.
76
95
77
96
`model_memory_limit`::
78
97
(Optional, string) The approximate maximum amount of memory resources that are
@@ -84,8 +103,20 @@ and mappings.
84
103
85
104
`source`::
86
105
(Required, object) The source configuration, consisting of `index` and
87
- optionally a `query`. See
88
- <<ml-dfanalytics-properties,{dfanalytics} properties>>.
106
+ optionally a `query`.
107
+
108
+ `index`:::
109
+ (Required, string or array) Index or indices on which to perform the
110
+ analysis. It can be a single index or index pattern as well as an array of
111
+ indices or patterns.
112
+
113
+ `query`:::
114
+ (Optional, object) The {es} query domain-specific language
115
+ (<<query-dsl,DSL>>). This value corresponds to the query object in an {es}
116
+ search POST body. All the options that are supported by {es} can be used,
117
+ as this object is passed verbatim to {es}. By default, this property has
118
+ the following value: `{"match_all": {}}`.
119
+
89
120
90
121
[[ml-put-dfanalytics-example]]
91
122
==== {api-examples-title}
@@ -113,6 +144,7 @@ PUT _ml/data_frame/analytics/loganalytics
113
144
// CONSOLE
114
145
// TEST[setup:setup_logdata]
115
146
147
+
116
148
The API returns the following result:
117
149
118
150
[source,js]
0 commit comments