Skip to content

Commit 6073b94

Browse files
szabostevejkakavas
authored andcommitted
[DOCS] [PUT DFA] Documents inline the child params of source and dest (elastic#45649)
* [DOCS] [PUT DFA] Documents inline the child params of source and dest. * [DOCS] Fixes indentation issues and amends dfa definitions.
1 parent 24f6bed commit 6073b94

File tree

2 files changed

+71
-20
lines changed

2 files changed

+71
-20
lines changed

docs/reference/ml/df-analytics/apis/dfanalyticsresources.asciidoc

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
`analyzed_fields` is not set, only the relevant fields will be included. For
2020
example all the numeric fields for {oldetection}.
2121

22+
`analyzed_fields.includes`:::
23+
(array) An array of strings that defines the fields that will be included in
24+
the analysis.
25+
26+
`analyzed_fields.excludes`:::
27+
(array) An array of strings that defines the fields that will be excluded
28+
from the analysis.
29+
30+
2231
[source,js]
2332
--------------------------------------------------
2433
PUT _ml/data_frame/analytics/loganalytics
@@ -46,11 +55,15 @@ PUT _ml/data_frame/analytics/loganalytics
4655
(Optional, string) A description of the job.
4756

4857
`dest`::
49-
(object) The destination configuration of the analysis. The `index` property
50-
(string) is the name of the index in which to store the results of the
51-
{dfanalytics-job}. The `results_field` (string) property defines the name of
52-
the field in which to store the results of the analysis. The default value is
53-
`ml`.
58+
(object) The destination configuration of the analysis.
59+
60+
`index`:::
61+
(Required, string) Defines the _destination index_ to store the results of
62+
the {dfanalytics-job}.
63+
64+
`results_field`:::
65+
(Optional, string) Defines the name of the field in which to store the
66+
results of the analysis. Default to `ml`.
5467

5568
`id`::
5669
(string) The unique identifier for the {dfanalytics-job}. This identifier can
@@ -67,14 +80,20 @@ PUT _ml/data_frame/analytics/loganalytics
6780
that setting. For more information, see <<ml-settings>>.
6881

6982
`source`::
70-
(object) The source configuration, consisting of `index` (array) which is an
71-
array of index names on which to perform the analysis. It can be a single
72-
index or index pattern as well as an array of indices or patterns. Optionally,
73-
`source` can have a `query` (object) property. The {es} query domain-specific
74-
language (DSL). This value corresponds to the query object in an {es} search
75-
POST body. All the options that are supported by {es} can be used, as this
76-
object is passed verbatim to {es}. By default, this property has the following
77-
value: `{"match_all": {}}`.
83+
(object) The source configuration consisting an `index` and optionally a
84+
`query` object.
85+
86+
`index`:::
87+
(Required, string or array) Index or indices on which to perform the
88+
analysis. It can be a single index or index pattern as well as an array of
89+
indices or patterns.
90+
91+
`query`:::
92+
(Optional, object) The {es} query domain-specific language
93+
(<<query-dsl,DSL>>). This value corresponds to the query object in an {es}
94+
search POST body. All the options that are supported by {es} can be used,
95+
as this object is passed verbatim to {es}. By default, this property has
96+
the following value: `{"match_all": {}}`.
7897

7998
[[dfanalytics-types]]
8099
==== Analysis objects

docs/reference/ml/df-analytics/apis/put-dfanalytics.asciidoc

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ experimental[]
1616

1717
`PUT _ml/data_frame/analytics/<data_frame_analytics_id>`
1818

19+
1920
[[ml-put-dfanalytics-prereq]]
2021
==== {api-prereq-title}
2122

@@ -25,6 +26,7 @@ also have `read` and `view_index_metadata` privileges on the source index and
2526
more information, see {stack-ov}/security-privileges.html[Security privileges]
2627
and {stack-ov}/built-in-roles.html[Built-in roles].
2728

29+
2830
[[ml-put-dfanalytics-desc]]
2931
==== {api-description-title}
3032

@@ -45,6 +47,7 @@ If the destination index already exists, then it will be use as is. This makes
4547
it possible to set up the destination index in advance with custom settings
4648
and mappings.
4749

50+
4851
[[ml-put-dfanalytics-path-params]]
4952
==== {api-path-parms-title}
5053

@@ -54,6 +57,7 @@ and mappings.
5457
characters (a-z and 0-9), hyphens, and underscores. It must start and end with
5558
alphanumeric characters.
5659

60+
5761
[[ml-put-dfanalytics-request-body]]
5862
==== {api-request-body-title}
5963

@@ -62,17 +66,32 @@ and mappings.
6266
index. For example: `outlier_detection`. See <<dfanalytics-types>>.
6367

6468
`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.
6880

6981
`description`::
7082
(Optional, string) A description of the job.
7183

7284
`dest`::
7385
(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`.
7695

7796
`model_memory_limit`::
7897
(Optional, string) The approximate maximum amount of memory resources that are
@@ -84,8 +103,20 @@ and mappings.
84103

85104
`source`::
86105
(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+
89120

90121
[[ml-put-dfanalytics-example]]
91122
==== {api-examples-title}
@@ -113,6 +144,7 @@ PUT _ml/data_frame/analytics/loganalytics
113144
// CONSOLE
114145
// TEST[setup:setup_logdata]
115146

147+
116148
The API returns the following result:
117149

118150
[source,js]

0 commit comments

Comments
 (0)