From d1bc806ddd1493f132b33e9d8a57cbbd5abdbbac Mon Sep 17 00:00:00 2001 From: Aria Marble <111301581+ariamarble@users.noreply.github.com> Date: Wed, 5 Oct 2022 08:45:49 -0700 Subject: [PATCH] Add ism rollup to documentation (#1371) * add ism rollup to documentation Signed-off-by: ariamarble * made suggested changes Signed-off-by: ariamarble * added field descriptions Signed-off-by: ariamarble * added further requested changes Signed-off-by: ariamarble * tech review updates Signed-off-by: ariamarble * minor spelling changes and link update Signed-off-by: ariamarble Signed-off-by: ariamarble (cherry picked from commit fa2535ab9d7890b10577713fa000e1fef2328816) --- _im-plugin/ism/policies.md | 107 +++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/_im-plugin/ism/policies.md b/_im-plugin/ism/policies.md index 85c8f3004e..04d65ba701 100644 --- a/_im-plugin/ism/policies.md +++ b/_im-plugin/ism/policies.md @@ -108,6 +108,7 @@ ISM supports the following operations: - [snapshot](#snapshot) - [index_priority](#index_priority) - [allocation](#allocation) +- [rollup](#rollup) ### force_merge @@ -438,6 +439,112 @@ Parameter | Description | Type | Required ] ``` +### rollup + +[Index rollup]({{site.url}}{{site.baseurl}}/im-plugin/index-rollups/index/) lets you periodically reduce data granularity by rolling up old data into summarized indexes. + +Rollup jobs can be continuous or non-continuous. A rollup job created using an ISM policy can only be non-continuous. +{: .note } + +#### Path and HTTP methods + +````bash +PUT _plugins/_rollup/jobs/ +GET _plugins/_rollup/jobs/ +DELETE _plugins/_rollup/jobs/ +POST _plugins/_rollup/jobs//_start +POST _plugins/_rollup/jobs//_stop +GET _plugins/_rollup/jobs//_explain +```` + +#### Sample ISM rollup policy + +````json +{ + "policy": { + "description": "Sample rollup" , + "default_state": "rollup", + "states": [ + { + "name": "rollup", + "actions": [ + { + "rollup": { + "ism_rollup": { + "description": "Creating rollup through ISM", + "target_index": "target", + "page_size": 1000, + "dimensions": [ + { + "date_histogram": { + "fixed_interval": "60m", + "source_field": "order_date", + "target_field": "order_date", + "timezone": "America/Los_Angeles" + } + }, + { + "terms": { + "source_field": "customer_gender", + "target_field": "customer_gender" + } + }, + { + "terms": { + "source_field": "day_of_week", + "target_field": "day_of_week" + } + } + ], + "metrics": [ + { + "source_field": "taxless_total_price", + "metrics": [ + { + "sum": {} + } + ] + }, + { + "source_field": "total_quantity", + "metrics": [ + { + "avg": {} + }, + { + "max": {} + } + ] + } + ] + } + } + } + ], + "transitions": [] + } + ] + } +} +```` + +#### Request fields + +Request fields are required when creating an ISM policy. You can reference the [Index rollups API]({{site.url}}{{site.baseurl}}/im-plugin/index-rollups/rollup-api/#create-or-update-an-index-rollup-job) page for request field options. + +#### Adding a rollup policy in Dashboards + +To add a rollup policy in Dashboards, follow the steps below. + +- Select the menu button on the top-left of the Dashboards user interface. +- In the Dashboards menu, select `Index Management`. +- On the next screen select `Rollup jobs`. +- Select the `Create rollup` button. +- Follow the steps in the `Create rollup job` wizard. +- Add a name for the policy in the `Name` box. +- You can reference the [Index rollups API]({{site.url}}{{site.baseurl}}/im-plugin/index-rollups/rollup-api/#create-or-update-an-index-rollup-job) page to configure the rollup policy. +- Finally, select the `Create` button on the bottom-right of the Dashboards user interface. + --- ## Transitions