Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ism rollup to documentation #1371

Merged
merged 6 commits into from
Oct 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions _im-plugin/ism/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ ISM supports the following operations:
- [snapshot](#snapshot)
- [index_priority](#index_priority)
- [allocation](#allocation)
- [rollup](#rollup)

### force_merge

Expand Down Expand Up @@ -438,6 +439,84 @@ Parameter | Description | Type | Required
]
```

### rollup

[Index rollup](https://opensearch.org/docs/latest/im-plugin/index-rollups/index/) lets you periodically reduce data granularity by rolling up old data into summarized indices.

Only a single rollup job can be created with this method. The source index for the rollup job is inferred from the index the policy it is attached to.
ariamarble marked this conversation as resolved.
Show resolved Hide resolved
ariamarble marked this conversation as resolved.
Show resolved Hide resolved
{: .note }

#### Sample ISM rollup policy

````json
{
ariamarble marked this conversation as resolved.
Show resolved Hide resolved
"policy": {
ariamarble marked this conversation as resolved.
Show resolved Hide resolved
"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": []
}
]
}
}
````

---

## Transitions
Expand Down