Skip to content

Commit bcd557d

Browse files
authored
Add target_index_settings to rollup specification (#822)
* Add target_index_settings to rollup specification Signed-off-by: Aleksandr Tuliakov <[email protected]> * Add test for target_index_settings to rollup specification Signed-off-by: Aleksandr Tuliakov <[email protected]> * Update changelog Signed-off-by: Aleksandr Tuliakov <[email protected]> * Fix version compatibles Signed-off-by: Aleksandr Tuliakov <[email protected]> * Fix lint error Signed-off-by: Aleksandr Tuliakov <[email protected]> * Fix tests/default/rollup/jobs.yaml Use different id for rollup job with index settings Signed-off-by: Aleksandr Tuliakov <[email protected]> --------- Signed-off-by: Aleksandr Tuliakov <[email protected]>
1 parent 8d5d843 commit bcd557d

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1212
- Added `time_in_execution` and `time_in_execution_millis` to `PendingTask` ([#922](https://github.com/opensearch-project/opensearch-api-specification/pull/922))
1313
- Added `phase_results_processor` to `NodeInfoSearchPipelines` ([#922](https://github.com/opensearch-project/opensearch-api-specification/pull/922))
1414
- Added new neural search stats and response filtering parameters (`include_individual_nodes`, `include_all_nodes`, `include_info`) to neural stats API ([#921](https://github.com/opensearch-project/opensearch-api-specification/pull/921))
15+
- Added `target_index_settings` to `Index Rollups API` from `index-management` plugin ([#822](https://github.com/opensearch-project/opensearch-api-specification/pull/822))
1516

1617
### Removed
1718

spec/schemas/rollups._common.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ components:
5353
target_index:
5454
type: string
5555
description: The target index where rollup results are stored.
56+
target_index_settings:
57+
x-version-added: 3.0.0
58+
$ref: 'indices._common.yaml#/components/schemas/IndexSettings'
5659
metadata_id:
5760
type: ['null', string]
5861
description: The metadata ID associated with the rollup job.

tests/default/rollup/jobs.yaml

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ chapters:
3434
enabled: true
3535
description: Rollup books.
3636
schedule:
37-
interval:
37+
interval:
3838
period: 1
3939
unit: Minutes
4040
source_index: books
@@ -76,3 +76,73 @@ chapters:
7676
method: DELETE
7777
parameters:
7878
id: books
79+
- synopsis: Create an index rollup job with target_index_settings.
80+
version: '>= 3.0'
81+
path: /_plugins/_rollup/jobs/{id}
82+
method: PUT
83+
parameters:
84+
id: books_with_settings
85+
request:
86+
payload:
87+
rollup:
88+
enabled: true
89+
description: Rollup books.
90+
schedule:
91+
interval:
92+
period: 1
93+
unit: Minutes
94+
source_index: books
95+
target_index: books_by_order_date
96+
target_index_settings:
97+
index.number_of_shards: 2
98+
index.number_of_replicas: 0
99+
index.codec: zlib
100+
page_size: 1
101+
delay: 0
102+
continuous: false
103+
dimensions:
104+
- date_histogram:
105+
source_field: order_date
106+
fixed_interval: 1h
107+
- terms:
108+
source_field: title
109+
metrics:
110+
- source_field: pages
111+
metrics:
112+
- sum: {}
113+
- avg: {}
114+
response:
115+
status: 201
116+
payload:
117+
_id: books_with_settings
118+
rollup:
119+
rollup_id: books_with_settings
120+
enabled: true
121+
target_index_settings:
122+
index:
123+
number_of_shards: '2'
124+
number_of_replicas: '0'
125+
codec: zlib
126+
- synopsis: Get an index rollup job with target_index_settings.
127+
version: '>= 3.0'
128+
path: /_plugins/_rollup/jobs/{id}
129+
method: GET
130+
parameters:
131+
id: books_with_settings
132+
response:
133+
status: 200
134+
payload:
135+
_id: books_with_settings
136+
rollup:
137+
rollup_id: books_with_settings
138+
target_index_settings:
139+
index:
140+
number_of_shards: '2'
141+
number_of_replicas: '0'
142+
codec: zlib
143+
- synopsis: Delete an index rollup job with target_index_settings.
144+
version: '>= 3.0'
145+
path: /_plugins/_rollup/jobs/{id}
146+
method: DELETE
147+
parameters:
148+
id: books_with_settings

0 commit comments

Comments
 (0)