Skip to content

Commit 97a6a5b

Browse files
committed
cleaning up examples
1 parent 6e7ee02 commit 97a6a5b

File tree

3 files changed

+9
-137
lines changed

3 files changed

+9
-137
lines changed

output/schema/schema.json

Lines changed: 5 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1+
summary: Gets the mappings for a data stream
12
method_request: GET /_data_stream/my-data-stream/_mappings
2-
alternatives:
3-
- language: Python
4-
code: |-
5-
resp = client.indices.get_data_stream_mappings(
6-
name="my-data-stream",
7-
)
8-
- language: JavaScript
9-
code: |-
10-
const response = await client.indices.getDataStreamSettings({
11-
name: "my-data-stream",
12-
});
13-
- language: Ruby
14-
code: |-
15-
response = client.indices.get_data_stream_mappings(
16-
name: "my-data-stream"
17-
)
18-
- language: PHP
19-
code: |-
20-
$resp = $client->indices()->getDataStreamSettings([
21-
"name" => "my-data-stream",
22-
]);
23-
- language: curl
24-
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/my-data-stream/_mappings"'
3+
type: request
Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
summary: Change a data stream setting
1+
summary: Change a data stream mapping
22
method_request: PUT /_data_stream/my-data-stream/_mappings
33
description: >
44
This is a request to add or modify two fields in a mapping on a data stream.
5-
# type: request
5+
type: request
66
value: |-
77
{
88
"properties":{
@@ -14,69 +14,3 @@ value: |-
1414
}
1515
}
1616
}
17-
alternatives:
18-
- language: Python
19-
code: |-
20-
resp = client.indices.put_data_stream_mappings(
21-
name="my-data-stream",
22-
mappings={
23-
"properties":{
24-
"field1":{
25-
"type":"ip"
26-
},
27-
"field3":{
28-
"type":"text"
29-
}
30-
}
31-
},
32-
)
33-
- language: JavaScript
34-
code: |-
35-
const response = await client.indices.putDataStreamSettings({
36-
name: "my-data-stream",
37-
mappings: {
38-
"properties":{
39-
"field1":{
40-
"type":"ip"
41-
},
42-
"field3":{
43-
"type":"text"
44-
}
45-
}
46-
},
47-
});
48-
- language: Ruby
49-
code: |-
50-
response = client.indices.put_data_stream_mappings(
51-
name: "my-data-stream",
52-
body: {
53-
"properties":{
54-
"field1":{
55-
"type":"ip"
56-
},
57-
"field3":{
58-
"type":"text"
59-
}
60-
}
61-
}
62-
)
63-
- language: PHP
64-
code: |-
65-
$resp = $client->indices()->putDataStreamSettings([
66-
"name" => "my-data-stream",
67-
"body" => [
68-
"properties" => [
69-
"field1" => [
70-
"type" => "ip"
71-
],
72-
"field3" => [
73-
"type" => "text"
74-
]
75-
]
76-
],
77-
]);
78-
- language: curl
79-
code:
80-
'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
81-
''{"index.lifecycle.name":"new-test-policy","index.number_of_shards":11}''
82-
"$ELASTICSEARCH_URL/_data_stream/my-data-stream/_mappings"'

0 commit comments

Comments
 (0)