Skip to content

Commit

Permalink
[DOCS] [PUT DFA] Documents inline the child params of source and dest (
Browse files Browse the repository at this point in the history
…#45649)

* [DOCS] [PUT DFA] Documents inline the child params of source and dest.

* [DOCS] Fixes indentation issues and amends dfa definitions.
  • Loading branch information
szabosteve committed Aug 29, 2019
1 parent da73e2b commit 9a51c1d
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 20 deletions.
45 changes: 32 additions & 13 deletions docs/reference/ml/df-analytics/apis/dfanalyticsresources.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
`analyzed_fields` is not set, only the relevant fields will be included. For
example all the numeric fields for {oldetection}.

`analyzed_fields.includes`:::
(array) An array of strings that defines the fields that will be included in
the analysis.

`analyzed_fields.excludes`:::
(array) An array of strings that defines the fields that will be excluded
from the analysis.


[source,js]
--------------------------------------------------
PUT _ml/data_frame/analytics/loganalytics
Expand All @@ -43,11 +52,15 @@ PUT _ml/data_frame/analytics/loganalytics
// TEST[setup:setup_logdata]

`dest`::
(object) The destination configuration of the analysis. The `index` property
(string) is the name of the index in which to store the results of the
{dfanalytics-job}. The `results_field` (string) property defines the name of
the field in which to store the results of the analysis. The default value is
`ml`.
(object) The destination configuration of the analysis.

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

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

`source`::
(object) The source configuration, consisting of `index` (array) which is an
array of index names on which to perform the analysis. It can be a single
index or index pattern as well as an array of indices or patterns. Optionally,
`source` can have a `query` (object) property. The {es} query domain-specific
language (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": {}}`.
(object) The source configuration consisting an `index` and optionally a
`query` object.

`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": {}}`.

[[dfanalytics-types]]
==== Analysis objects
Expand Down
49 changes: 42 additions & 7 deletions docs/reference/ml/df-analytics/apis/put-dfanalytics.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ experimental[]

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


[[ml-put-dfanalytics-prereq]]
==== {api-prereq-title}

Expand All @@ -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}

Expand All @@ -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}

Expand All @@ -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}

Expand All @@ -62,14 +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
Expand All @@ -81,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}
Expand All @@ -109,6 +143,7 @@ PUT _ml/data_frame/analytics/loganalytics
// CONSOLE
// TEST[setup:setup_logdata]


The API returns the following result:

[source,js]
Expand Down

0 comments on commit 9a51c1d

Please sign in to comment.