-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added/fixed /_plugins/_rollup/jobs. (#716)
Signed-off-by: dblock <[email protected]> Signed-off-by: Thomas Farr <[email protected]> Co-authored-by: Thomas Farr <[email protected]>
- Loading branch information
Showing
7 changed files
with
279 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test index rollups. | ||
|
||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: books, _id: book_1392214}} | ||
- {author: Harper Lee, title: To Kill a Mockingbird, order_date: '2021-02-27T03:56:10+00:00', pages: 285} | ||
- {create: {_index: books, _id: book_1392215}} | ||
- {author: Elizabeth Rudnick, title: Beauty and the Beast, order_date: '2024-12-09T04:37:10-05:00', pages: 275} | ||
epilogues: | ||
- path: /_plugins/_rollup/jobs/books | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Create an index rollup job. | ||
path: /_plugins/_rollup/jobs/{id} | ||
method: PUT | ||
parameters: | ||
id: books | ||
request: | ||
payload: | ||
rollup: | ||
enabled: true | ||
description: Rollup books. | ||
schedule: | ||
interval: | ||
period: 1 | ||
unit: Minutes | ||
source_index: books | ||
target_index: books_by_order_date | ||
page_size: 1 | ||
delay: 0 | ||
continuous: false | ||
dimensions: | ||
- date_histogram: | ||
source_field: order_date | ||
fixed_interval: 1h | ||
- terms: | ||
source_field: title | ||
metrics: | ||
- source_field: pages | ||
metrics: | ||
- sum: {} | ||
- avg: {} | ||
response: | ||
status: 201 | ||
payload: | ||
_id: books | ||
rollup: | ||
rollup_id: books | ||
enabled: true | ||
- synopsis: Delete an index rollup job. | ||
path: /_plugins/_rollup/jobs/{id} | ||
method: DELETE | ||
parameters: | ||
id: books |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test index rollups. | ||
|
||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: books, _id: book_1392214}} | ||
- {author: Harper Lee, title: To Kill a Mockingbird, order_date: '2021-02-27T03:56:10+00:00', pages: 285} | ||
- {create: {_index: books, _id: book_1392215}} | ||
- {author: Elizabeth Rudnick, title: Beauty and the Beast, order_date: '2024-12-09T04:37:10-05:00', pages: 275} | ||
- path: /_plugins/_rollup/jobs/books_rollup_job | ||
method: PUT | ||
request: | ||
payload: | ||
rollup: | ||
enabled: true | ||
description: Rollup books. | ||
schedule: | ||
interval: | ||
period: 1 | ||
unit: Minutes | ||
source_index: books | ||
target_index: books_by_order_date | ||
page_size: 1 | ||
delay: 0 | ||
continuous: false | ||
dimensions: | ||
- date_histogram: | ||
source_field: order_date | ||
fixed_interval: 1h | ||
- terms: | ||
source_field: title | ||
metrics: | ||
- source_field: pages | ||
metrics: | ||
- sum: {} | ||
- avg: {} | ||
- path: /_plugins/_rollup/jobs/books_rollup_job/_start | ||
method: POST | ||
epilogues: | ||
- path: /_plugins/_rollup/jobs/books_rollup_job | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Explain an index rollup job. | ||
path: /_plugins/_rollup/jobs/{id}/_explain | ||
method: GET | ||
parameters: | ||
id: books_rollup_job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test index rollups. | ||
|
||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: books, _id: book_1392214}} | ||
- {author: Harper Lee, title: To Kill a Mockingbird, order_date: '2021-02-27T03:56:10+00:00', pages: 285} | ||
- {create: {_index: books, _id: book_1392215}} | ||
- {author: Elizabeth Rudnick, title: Beauty and the Beast, order_date: '2024-12-09T04:37:10-05:00', pages: 275} | ||
- path: /_plugins/_rollup/jobs/books | ||
method: PUT | ||
request: | ||
payload: | ||
rollup: | ||
enabled: true | ||
description: Rollup books. | ||
schedule: | ||
interval: | ||
period: 1 | ||
unit: Minutes | ||
source_index: books | ||
target_index: books_by_order_date | ||
page_size: 1 | ||
delay: 0 | ||
continuous: false | ||
dimensions: | ||
- date_histogram: | ||
source_field: order_date | ||
fixed_interval: 1h | ||
- terms: | ||
source_field: title | ||
metrics: | ||
- source_field: pages | ||
metrics: | ||
- sum: {} | ||
- avg: {} | ||
epilogues: | ||
- path: /_plugins/_rollup/jobs/books | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Start an index rollup job. | ||
path: /_plugins/_rollup/jobs/{id}/_start | ||
method: POST | ||
parameters: | ||
id: books |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test index rollups. | ||
|
||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: books, _id: book_1392214}} | ||
- {author: Harper Lee, title: To Kill a Mockingbird, order_date: '2021-02-27T03:56:10+00:00', pages: 285} | ||
- {create: {_index: books, _id: book_1392215}} | ||
- {author: Elizabeth Rudnick, title: Beauty and the Beast, order_date: '2024-12-09T04:37:10-05:00', pages: 275} | ||
- path: /_plugins/_rollup/jobs/books | ||
method: PUT | ||
request: | ||
payload: | ||
rollup: | ||
enabled: true | ||
description: Rollup books. | ||
schedule: | ||
interval: | ||
period: 1 | ||
unit: Minutes | ||
source_index: books | ||
target_index: books_by_order_date | ||
page_size: 1 | ||
delay: 0 | ||
continuous: false | ||
dimensions: | ||
- date_histogram: | ||
source_field: order_date | ||
fixed_interval: 1h | ||
- terms: | ||
source_field: title | ||
metrics: | ||
- source_field: pages | ||
metrics: | ||
- sum: {} | ||
- avg: {} | ||
- path: /_plugins/_rollup/jobs/books/_start | ||
method: POST | ||
epilogues: | ||
- path: /_plugins/_rollup/jobs/books | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Stop an index rollup job. | ||
path: /_plugins/_rollup/jobs/{id}/_stop | ||
method: POST | ||
parameters: | ||
id: books |