Skip to content

Commit 4ad4f51

Browse files
committed
[DOCS] Moves ml folder from x-pack/docs to docs (#33248)
1 parent e771da4 commit 4ad4f51

39 files changed

+43
-129
lines changed

docs/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919

2020
apply plugin: 'elasticsearch.docs-test'
2121

22+
/* List of files that have snippets that require a gold or platinum licence
23+
and therefore cannot be tested yet... */
24+
buildRestTests.expectedUnconvertedCandidates = [
25+
'reference/ml/transforms.asciidoc',
26+
]
27+
2228
integTestCluster {
2329
/* Enable regexes in painless so our tests don't complain about example
2430
* snippets that use them. */

x-pack/docs/en/ml/aggregations.asciidoc renamed to docs/reference/ml/aggregations.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ PUT _xpack/ml/anomaly_detectors/farequote
4141
}
4242
----------------------------------
4343
// CONSOLE
44-
// TEST[setup:farequote_data]
44+
// TEST[skip:setup:farequote_data]
4545

4646
In this example, the `airline`, `responsetime`, and `time` fields are
4747
aggregations.
@@ -90,7 +90,7 @@ PUT _xpack/ml/datafeeds/datafeed-farequote
9090
}
9191
----------------------------------
9292
// CONSOLE
93-
// TEST[setup:farequote_job]
93+
// TEST[skip:setup:farequote_job]
9494

9595
In this example, the aggregations have names that match the fields that they
9696
operate on. That is to say, the `max` aggregation is named `time` and its

x-pack/docs/en/ml/categories.asciidoc renamed to docs/reference/ml/categories.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ PUT _xpack/ml/anomaly_detectors/it_ops_new_logs
4444
}
4545
----------------------------------
4646
//CONSOLE
47+
// TEST[skip:needs-licence]
4748
<1> The `categorization_field_name` property indicates which field will be
4849
categorized.
4950
<2> The resulting categories are used in a detector by setting `by_field_name`,
@@ -127,6 +128,7 @@ PUT _xpack/ml/anomaly_detectors/it_ops_new_logs2
127128
}
128129
----------------------------------
129130
//CONSOLE
131+
// TEST[skip:needs-licence]
130132
<1> The
131133
{ref}/analysis-pattern-replace-charfilter.html[`pattern_replace` character filter]
132134
here achieves exactly the same as the `categorization_filters` in the first
@@ -193,6 +195,7 @@ PUT _xpack/ml/anomaly_detectors/it_ops_new_logs3
193195
}
194196
----------------------------------
195197
//CONSOLE
198+
// TEST[skip:needs-licence]
196199
<1> Tokens basically consist of hyphens, digits, letters, underscores and dots.
197200
<2> By default, categorization ignores tokens that begin with a digit.
198201
<3> By default, categorization also ignores tokens that are hexadecimal numbers.

x-pack/docs/en/ml/configuring.asciidoc renamed to docs/reference/ml/configuring.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ The scenarios in this section describe some best practices for generating useful
3535
* <<ml-configuring-pop>>
3636
* <<ml-configuring-transform>>
3737

38-
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ml/customurl.asciidoc
38+
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/customurl.asciidoc
3939
include::customurl.asciidoc[]
4040

41-
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ml/aggregations.asciidoc
41+
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/aggregations.asciidoc
4242
include::aggregations.asciidoc[]
4343

44-
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ml/categories.asciidoc
44+
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/categories.asciidoc
4545
include::categories.asciidoc[]
4646

47-
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ml/populations.asciidoc
47+
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/populations.asciidoc
4848
include::populations.asciidoc[]
4949

50-
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/x-pack/docs/en/ml/transforms.asciidoc
50+
:edit_url: https://github.com/elastic/elasticsearch/edit/{branch}/docs/reference/ml/transforms.asciidoc
5151
include::transforms.asciidoc[]

x-pack/docs/en/ml/customurl.asciidoc renamed to docs/reference/ml/customurl.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ POST _xpack/ml/anomaly_detectors/sample_job/_update
106106
}
107107
----------------------------------
108108
//CONSOLE
109-
//TEST[setup:sample_job]
109+
//TEST[skip:setup:sample_job]
110110

111111
When you click this custom URL in the anomalies table in {kib}, it opens up the
112112
*Discover* page and displays source data for the period one hour before and
File renamed without changes.

x-pack/docs/en/ml/functions/count.asciidoc renamed to docs/reference/ml/functions/count.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ PUT _xpack/ml/anomaly_detectors/example1
5959
}
6060
--------------------------------------------------
6161
// CONSOLE
62+
// TEST[skip:needs-licence]
6263

6364
This example is probably the simplest possible analysis. It identifies
6465
time buckets during which the overall count of events is higher or lower than
@@ -86,6 +87,7 @@ PUT _xpack/ml/anomaly_detectors/example2
8687
}
8788
--------------------------------------------------
8889
// CONSOLE
90+
// TEST[skip:needs-licence]
8991

9092
If you use this `high_count` function in a detector in your job, it
9193
models the event rate for each error code. It detects users that generate an
@@ -110,6 +112,7 @@ PUT _xpack/ml/anomaly_detectors/example3
110112
}
111113
--------------------------------------------------
112114
// CONSOLE
115+
// TEST[skip:needs-licence]
113116

114117
In this example, the function detects when the count of events for a
115118
status code is lower than usual.
@@ -136,6 +139,7 @@ PUT _xpack/ml/anomaly_detectors/example4
136139
}
137140
--------------------------------------------------
138141
// CONSOLE
142+
// TEST[skip:needs-licence]
139143

140144
If you are analyzing an aggregated `events_per_min` field, do not use a sum
141145
function (for example, `sum(events_per_min)`). Instead, use the count function
@@ -200,6 +204,7 @@ PUT _xpack/ml/anomaly_detectors/example5
200204
}
201205
--------------------------------------------------
202206
// CONSOLE
207+
// TEST[skip:needs-licence]
203208

204209
If you use this `high_non_zero_count` function in a detector in your job, it
205210
models the count of events for the `signaturename` field. It ignores any buckets
@@ -253,6 +258,7 @@ PUT _xpack/ml/anomaly_detectors/example6
253258
}
254259
--------------------------------------------------
255260
// CONSOLE
261+
// TEST[skip:needs-licence]
256262

257263
This `distinct_count` function detects when a system has an unusual number
258264
of logged in users. When you use this function in a detector in your job, it
@@ -278,6 +284,7 @@ PUT _xpack/ml/anomaly_detectors/example7
278284
}
279285
--------------------------------------------------
280286
// CONSOLE
287+
// TEST[skip:needs-licence]
281288

282289
This example detects instances of port scanning. When you use this function in a
283290
detector in your job, it models the distinct count of ports. It also detects the

x-pack/docs/en/ml/functions/geo.asciidoc renamed to docs/reference/ml/functions/geo.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ PUT _xpack/ml/anomaly_detectors/example1
4545
}
4646
--------------------------------------------------
4747
// CONSOLE
48+
// TEST[skip:needs-licence]
4849

4950
If you use this `lat_long` function in a detector in your job, it
5051
detects anomalies where the geographic location of a credit card transaction is
@@ -96,6 +97,6 @@ PUT _xpack/ml/datafeeds/datafeed-test2
9697
}
9798
--------------------------------------------------
9899
// CONSOLE
99-
// TEST[setup:farequote_job]
100+
// TEST[skip:setup:farequote_job]
100101

101102
For more information, see <<ml-configuring-transform>>.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)