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 2 commits
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
98 changes: 98 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,103 @@ 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 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 }

#### Path and HTTP methods

````bash
POST _plugins/_ism/add/<index>
````

#### 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": []
}
]
}
}
````

#### Field parameters
ariamarble marked this conversation as resolved.
Show resolved Hide resolved

The following field parameters are required:
ariamarble marked this conversation as resolved.
Show resolved Hide resolved

Field Parameter | Data Type | Description
:--- | :--- |:---
source_field | String | The field(s) to transform.
ariamarble marked this conversation as resolved.
Show resolved Hide resolved
target_field | String | The target field(s) the newly transformed data is added to.
fixed_interval | String | Define the interval period. Specify the fixed interval in milliseconds, seconds, minutes, hours, or days.
ariamarble marked this conversation as resolved.
Show resolved Hide resolved
timezone | String | The timezone that triggers the rollup. Default is UTC.
page_size | Number | The number of indexes to be returned per page.
default_state | String | Set to `rollup` for an ISM rollup policy.

ariamarble marked this conversation as resolved.
Show resolved Hide resolved
---

## Transitions
Expand Down