Skip to content

Commit 1613d9a

Browse files
committed
[DOCS] Adds more generated docs with 200 OK
1 parent 4caa70c commit 1613d9a

File tree

415 files changed

+6322
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

415 files changed

+6322
-4
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.forcemerge(
4+
index: '.ds-my-data-stream-2099.03.07-000001',
5+
max_num_segments: 1
6+
)
7+
puts response
8+
----
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[source, ruby]
2+
----
3+
response = client.transform.start_transform(
4+
transform_id: 'ecommerce_transform'
5+
)
6+
puts response
7+
----
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.put_settings(
4+
index: 'my_source_index',
5+
body: {
6+
settings: {
7+
"index.blocks.write": true
8+
}
9+
}
10+
)
11+
puts response
12+
----
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.refresh(
4+
index: 'my-index-000001,my-index-000002'
5+
)
6+
puts response
7+
----
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[source, ruby]
2+
----
3+
response = client.snapshot.restore(
4+
repository: 'my_repository',
5+
snapshot: 'my_snapshot_2099.05.06',
6+
body: {
7+
indices: 'my-index,logs-my_app-default',
8+
rename_pattern: '(.+)',
9+
rename_replacement: 'restored-$1'
10+
}
11+
)
12+
puts response
13+
----
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[source, ruby]
2+
----
3+
response = client.transform.reset_transform(
4+
transform_id: 'ecommerce_transform'
5+
)
6+
puts response
7+
----
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[source, ruby]
2+
----
3+
response = client.ml.evaluate_data_frame(
4+
body: {
5+
index: 'house_price_predictions',
6+
query: {
7+
bool: {
8+
filter: [
9+
{
10+
term: {
11+
"ml.is_training": false
12+
}
13+
}
14+
]
15+
}
16+
},
17+
evaluation: {
18+
regression: {
19+
actual_field: 'price',
20+
predicted_field: 'ml.price_prediction',
21+
metrics: {
22+
r_squared: {},
23+
mse: {},
24+
msle: {
25+
offset: 10
26+
},
27+
huber: {
28+
delta: 1.5
29+
}
30+
}
31+
}
32+
}
33+
}
34+
)
35+
puts response
36+
----
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.put_settings(
4+
index: 'logs-my_app-default',
5+
body: {
6+
index: {
7+
lifecycle: {
8+
name: 'new-lifecycle-policy'
9+
}
10+
}
11+
}
12+
)
13+
puts response
14+
----
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[source, ruby]
2+
----
3+
response = client.snapshot.status(
4+
repository: 'my_repository',
5+
snapshot: 'snapshot_2'
6+
)
7+
puts response
8+
----
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.rollover(
4+
alias: 'my-alias',
5+
body: {
6+
conditions: {
7+
max_age: '7d',
8+
max_docs: 1000,
9+
max_primary_shard_size: '50gb',
10+
max_primary_shard_docs: '2000'
11+
}
12+
}
13+
)
14+
puts response
15+
----

0 commit comments

Comments
 (0)