Skip to content

Commit 5acc6cd

Browse files
committed
[DOCS] Updates generated docs
1 parent 2e75c02 commit 5acc6cd

File tree

127 files changed

+2975
-452
lines changed

Some content is hidden

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

127 files changed

+2975
-452
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[source, ruby]
22
----
33
response = client.search(
4-
index: 'sample-01*'
4+
index: 'my-data-stream'
55
)
66
puts response
77
----
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
[source, ruby]
2+
----
3+
response = client.indices.create(
4+
index: 'clientips',
5+
body: {
6+
mappings: {
7+
properties: {
8+
client_ip: {
9+
type: 'keyword'
10+
},
11+
env: {
12+
type: 'keyword'
13+
}
14+
}
15+
}
16+
}
17+
)
18+
puts response
19+
20+
response = client.bulk(
21+
index: 'clientips',
22+
body: [
23+
{
24+
index: {}
25+
},
26+
{
27+
client_ip: '172.21.0.5',
28+
env: 'Development'
29+
},
30+
{
31+
index: {}
32+
},
33+
{
34+
client_ip: '172.21.2.113',
35+
env: 'QA'
36+
},
37+
{
38+
index: {}
39+
},
40+
{
41+
client_ip: '172.21.2.162',
42+
env: 'QA'
43+
},
44+
{
45+
index: {}
46+
},
47+
{
48+
client_ip: '172.21.3.15',
49+
env: 'Production'
50+
},
51+
{
52+
index: {}
53+
},
54+
{
55+
client_ip: '172.21.3.16',
56+
env: 'Production'
57+
}
58+
]
59+
)
60+
puts response
61+
62+
response = client.enrich.put_policy(
63+
name: 'clientip_policy',
64+
body: {
65+
match: {
66+
indices: 'clientips',
67+
match_field: 'client_ip',
68+
enrich_fields: [
69+
'env'
70+
]
71+
}
72+
}
73+
)
74+
puts response
75+
76+
response = client.enrich.execute_policy(
77+
name: 'clientip_policy',
78+
wait_for_completion: false
79+
)
80+
puts response
81+
----

docs/examples/guide/28d3bb1dbed615c6e719d50d48ab6fb4.asciidoc renamed to docs/examples/guide/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ response = client.search(
99
flags: 'ALL',
1010
case_insensitive: true,
1111
max_determinized_states: 10_000,
12-
rewrite: 'constant_score'
12+
rewrite: 'constant_score_blended'
1313
}
1414
}
1515
}

docs/examples/guide/0ac5ec27c129b9541a6ddad6aeea1276.asciidoc renamed to docs/examples/guide/0cee58617e75f493c5049d77be1c49f3.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ response = client.search(
1010
max_expansions: 50,
1111
prefix_length: 0,
1212
transpositions: true,
13-
rewrite: 'constant_score'
13+
rewrite: 'constant_score_blended'
1414
}
1515
}
1616
}

docs/examples/guide/0514111513bb21f69a40c6258573264f.asciidoc renamed to docs/examples/guide/0eccea755bd4f6dd47579a9022690546.asciidoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ response = client.cluster.put_settings(
55
persistent: {
66
cluster: {
77
remote: {
8-
cluster_one: {
9-
seeds: [
10-
'127.0.0.1:9300'
11-
]
8+
my_remote: {
9+
mode: 'proxy',
10+
proxy_address: 'my.remote.cluster.com:9443'
1211
}
1312
}
1413
}

docs/examples/guide/d6c3659339ef4f2d47425e09eccbf939.asciidoc renamed to docs/examples/guide/0f9a213d2cc4b9c2738446d5a7aee976.asciidoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ response = client.cluster.put_component_template(
66
template: {
77
settings: {
88
'index.lifecycle.name' => 'my-lifecycle-policy',
9-
'index.look_ahead_time' => '3h',
10-
'index.codec' => 'best_compression'
9+
'index.look_ahead_time' => '3h'
1110
}
1211
},
1312
_meta: {
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.rollover(
4+
alias: 'dsl-data-stream'
5+
)
6+
puts response
7+
----
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[source, ruby]
2+
----
3+
response = client.inference.inference(
4+
task_type: 'sparse_embedding',
5+
model_id: 'my-elser-model',
6+
body: {
7+
input: 'The sky above the port was the color of television tuned to a dead channel.'
8+
}
9+
)
10+
puts response
11+
----
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[source, ruby]
2+
----
3+
response = client.bulk(
4+
index: 'my-data-stream',
5+
body: [
6+
{
7+
create: {}
8+
},
9+
{
10+
"@timestamp": '2099-05-06T16:21:15.000Z',
11+
message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736'
12+
},
13+
{
14+
create: {}
15+
},
16+
{
17+
"@timestamp": '2099-05-06T16:25:42.000Z',
18+
message: '192.0.2.255 - - [06/May/2099:16:25:42 +0000] "GET /favicon.ico HTTP/1.0" 200 3638'
19+
}
20+
]
21+
)
22+
puts response
23+
----

docs/examples/guide/165bebb9ce8b6babb72672db5b8b5976.asciidoc

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)