Browse Source

[DOCS] [PUT DFA] Documents inline the child params of source and dest (#45649)

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

* [DOCS] Fixes indentation issues and amends dfa definitions.
István Zoltán Szabó 6 years ago
parent
commit
626bbccd6e

+ 32 - 13
docs/reference/ml/df-analytics/apis/dfanalyticsresources.asciidoc

@@ -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
@@ -46,11 +55,15 @@ PUT _ml/data_frame/analytics/loganalytics
   (Optional, string) A description of the job.
 
 `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 
@@ -67,14 +80,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

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

@@ -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]