Skip to content

Commit 91275cb

Browse files
committed
Update ilm examples
1 parent 877733b commit 91275cb

25 files changed

+218
-68
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ actions:
168168
application/json:
169169
examples:
170170
putLifecycleRequestExample1:
171-
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json"
171+
$ref: "../../specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml"
172172
responses:
173173
200:
174174
content:
175175
application/json:
176176
examples:
177177
putLifecycleResponseExample1:
178-
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json"
178+
$ref: "../../specification/ilm/put_lifecycle/examples/response/PutLifecycleResponseExample1.yaml"
179179
- target: "$.components['responses']['ilm.get_lifecycle#200']"
180180
description: "Add examples for get lifecycle policy operation"
181181
update:
@@ -192,14 +192,14 @@ actions:
192192
application/json:
193193
examples:
194194
migrateToDataTiersRequestExample1:
195-
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json"
195+
$ref: "../../specification/ilm/migrate_to_data_tiers/examples/request/RequestExample1.yaml"
196196
responses:
197197
200:
198198
content:
199199
application/json:
200200
examples:
201201
migrateToDataTiersResponseExample1:
202-
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json"
202+
$ref: "../../specification/ilm/migrate_to_data_tiers/examples/response/ResponseExample1.yaml"
203203
- target: "$.paths['/_ilm/move/{index}']['post']"
204204
description: "Add examples for move to lifecycle step operation"
205205
update:
@@ -208,14 +208,16 @@ actions:
208208
application/json:
209209
examples:
210210
moveToStepRequestExample1:
211-
$ref: "../../specification/ilm/move_to_step/MoveToStepRequestExample1.json"
211+
$ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml"
212+
moveToStepRequestExample2:
213+
$ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml"
212214
responses:
213215
200:
214216
content:
215217
application/json:
216218
examples:
217219
moveToStepResponseExample1:
218-
$ref: "../../specification/ilm/move_to_step/MoveToStepResponseExample1.json"
220+
$ref: "../../specification/ilm/move_to_step/examples/response/MoveToStepResponseExample1.yaml"
219221
- target: "$.paths['/_ilm/start']['post']"
220222
description: "Add examples for start index lifecycle management operation"
221223
update:

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,15 +1172,15 @@ actions:
11721172
application/json:
11731173
examples:
11741174
esqlQueryRequestExample1:
1175-
$ref: "../../specification/esql/query/EsqlQueryApiRequestExample1.json"
1175+
$ref: "../../specification/esql/query/examples/request/QueryRequestExample1.yaml"
11761176
- target: "$.components['requestBodies']['graph.explore']"
11771177
description: "Add example for graph explore request"
11781178
update:
11791179
content:
11801180
application/json:
11811181
examples:
11821182
graphExploreRequestExample1:
1183-
$ref: "../../specification/graph/explore/graphExploreRequestExample1.json"
1183+
$ref: "../../specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml"
11841184
- target: "$.paths['/{index}/_block/{block}']['put']"
11851185
description: "Add examples for add index block operation"
11861186
update:

output/openapi/elasticsearch-openapi.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 15 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/esql/query/EsqlQueryApiRequestExample1.json

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# summary:
2+
# method_request: POST /_query
3+
description: Run `POST /_query` to get results for an ES|QL query.
4+
# type: request
5+
value: |-
6+
{
7+
"query": """
8+
FROM library
9+
| EVAL year = DATE_TRUNC(1 YEARS, release_date)
10+
| STATS MAX(page_count) BY year
11+
| SORT year
12+
| LIMIT 5
13+
"""
14+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# summary:
2+
# method_request: POST clicklogs/_graph/explore
3+
description: >
4+
Run `POST clicklogs/_graph/explore` for a basic exploration
5+
An initial graph explore query typically begins with a query to identify strongly related terms.
6+
Seed the exploration with a query. This example is searching `clicklogs` for people who searched for the term `midi`.Identify the vertices to include in the graph. This example is looking for product codes that are significantly associated with searches for `midi`.
7+
Find the connections. This example is looking for other search terms that led people to click on the products that are associated with searches for `midi`.
8+
# type: request
9+
value: |-
10+
{
11+
"query": {
12+
"match": {
13+
"query.raw": "midi"
14+
}
15+
},
16+
"vertices": [
17+
{
18+
"field": "product"
19+
}
20+
],
21+
"connections": {
22+
"vertices": [
23+
{
24+
"field": "query.raw"
25+
}
26+
]
27+
}
28+
}

specification/graph/explore/graphExploreRequestExample1.json

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

specification/ilm/_types/Policy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ import { Phases } from './Phase'
2222

2323
export class Policy {
2424
phases: Phases
25+
/**
26+
* Arbitrary metadata that is not automatically generated or used by Elasticsearch.
27+
*/
2528
_meta?: Metadata
2629
}

specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json

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

0 commit comments

Comments
 (0)