Skip to content

Commit

Permalink
[DOCS] Fixes nesting of datafeed config in APIs (#75502) (#75545)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Jul 20, 2021
1 parent aca4a09 commit 6d82142
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 45 deletions.
28 changes: 26 additions & 2 deletions docs/reference/ml/anomaly-detection/apis/get-job.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ property is informational; you cannot change its value.
`datafeed_config`::
(object) The {dfeed} configured for the current {anomaly-job}.
+
.Properties of `datafeed`
.Properties of `datafeed_config`
[%collapsible%open]
====
`datafeed_id`:::
Expand All @@ -98,10 +98,34 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=aggregations]
`chunking_config`:::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=chunking-config]
+
.Properties of `chunking_config`
[%collapsible%open]
=====
`mode`:::
(string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=mode]

`time_span`:::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=time-span]
=====
`delayed_data_check_config`:::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config]
+
.Properties of `delayed_data_check_config`
[%collapsible%open]
=====
`check_window`::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config-check-window]

`enabled`::
(Boolean)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config-enabled]
=====
`frequency`:::
(Optional, <<time-units, time units>>)
Expand All @@ -115,7 +139,7 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=indices]
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=indices-options]
`job_id`::
`job_id`:::
(Required, string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
Expand Down
24 changes: 24 additions & 0 deletions docs/reference/ml/anomaly-detection/apis/put-datafeed.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,34 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=aggregations]
`chunking_config`::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=chunking-config]
+
.Properties of `chunking_config`
[%collapsible%open]
====
`mode`:::
(string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=mode]
`time_span`:::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=time-span]
====

`delayed_data_check_config`::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config]
+
.Properties of `delayed_data_check_config`
[%collapsible%open]
====
`check_window`::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config-check-window]
`enabled`::
(Boolean)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config-enabled]
====

`frequency`::
(Optional, <<time-units, time units>>)
Expand Down
55 changes: 40 additions & 15 deletions docs/reference/ml/anomaly-detection/apis/put-job.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -235,28 +235,63 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=background-persist-interval]
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=custom-settings]

`daily_model_snapshot_retention_after_days`::
(Optional, long)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=daily-model-snapshot-retention-after-days]

//Begin data_description
[[put-datadescription]]`data_description`::
(Required, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=data-description]
//End data_description

`datafeed_config`::
(object) The {dfeed} configured for the current {anomaly-job}.
+
.Properties of `datafeed`
[%collapsible%open]
====
`datafeed_id`:::
(Optional, string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=datafeed-id]
Defaults to the same ID as the {anomaly-job}.
`aggregations`:::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=aggregations]
`chunking_config`:::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=chunking-config]
+
.Properties of `chunking_config`
[%collapsible%open]
=====
`mode`:::
(string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=mode]

`time_span`:::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=time-span]
=====
`datafeed_id`:::
(Optional, string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=datafeed-id]
+
Defaults to the same ID as the {anomaly-job}.
`delayed_data_check_config`:::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config]
+
.Properties of `delayed_data_check_config`
[%collapsible%open]
=====
`check_window`::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config-check-window]

`enabled`::
(Boolean)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config-enabled]
=====
`frequency`:::
(Optional, <<time-units, time units>>)
Expand Down Expand Up @@ -295,16 +330,6 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=script-fields]
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=scroll-size]
====

//Begin data_description
[[put-datadescription]]`data_description`::
(Required, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=data-description]
//End data_description

`daily_model_snapshot_retention_after_days`::
(Optional, long)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=daily-model-snapshot-retention-after-days]

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,34 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=aggregations]
`chunking_config`::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=chunking-config]

+
.Properties of `chunking_config`
[%collapsible%open]
====
`mode`:::
(string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=mode]
`time_span`:::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=time-span]
====

`delayed_data_check_config`::
(Optional, object)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config]
+
.Properties of `delayed_data_check_config`
[%collapsible%open]
====
`check_window`::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config-check-window]
`enabled`::
(Boolean)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=delayed-data-check-config-enabled]
====

`frequency`::
(Optional, <<time-units, time units>>)
Expand Down
40 changes: 13 additions & 27 deletions docs/reference/ml/ml-shared.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -296,18 +296,6 @@ tag::chunking-config[]
months or years. This search is split into time chunks in order to ensure the
load on {es} is managed. Chunking configuration controls how the size of these
time chunks are calculated and is an advanced configuration option.
+
.Properties of `chunking_config`
[%collapsible%open]
====
`mode`:::
(string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=mode]

`time_span`:::
(<<time-units,time units>>)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=time-span]
====
end::chunking-config[]

tag::class-assignment-objective[]
Expand Down Expand Up @@ -468,23 +456,21 @@ that moment in time. See
{ml-docs}/ml-delayed-data-detection.html[Working with delayed data].
+
This check runs only on real-time {dfeeds}.
+
.Properties of `delayed_data_check_config`
[%collapsible%open]
====
`check_window`::
(<<time-units,time units>>) The window of time that is searched for late data.
This window of time ends with the latest finalized bucket. It defaults to
`null`, which causes an appropriate `check_window` to be calculated when the
real-time {dfeed} runs. In particular, the default `check_window` span
calculation is based on the maximum of `2h` or `8 * bucket_span`.

`enabled`::
(Boolean) Specifies whether the {dfeed} periodically checks for delayed data.
Defaults to `true`.
====
end::delayed-data-check-config[]

tag::delayed-data-check-config-check-window[]
The window of time that is searched for late data. This window of time ends with
the latest finalized bucket. It defaults to `null`, which causes an appropriate
`check_window` to be calculated when the real-time {dfeed} runs. In particular,
the default `check_window` span calculation is based on the maximum of `2h` or
`8 * bucket_span`.
end::delayed-data-check-config-check-window[]

tag::delayed-data-check-config-enabled[]
Specifies whether the {dfeed} periodically checks for delayed data. Defaults to
`true`.
end::delayed-data-check-config-enabled[]

tag::dependent-variable[]
Defines which field of the document is to be predicted.
This parameter is supplied by field name and must match one of the fields in
Expand Down

0 comments on commit 6d82142

Please sign in to comment.