How Do I Update the CSS Lifecycle Policy?
The CSS lifecycle is implemented using the Index State Management (ISM) of Open Distro. For details about how to configure policies related to the ISM template, see the Open Distro documentation.
- When a policy is created, the system writes a record to the .opendistro-ism-config index. In the record, _id is the policy name, and the content is the policy definition.
Figure 1 Writing a data record
- After a policy is bound to an index, the system writes another record to the .opendistro-ism-config index. The following figure shows the initial status of a record.
Figure 2 Initial data status
- Run the explain command. Only a policy ID will be returned.
GET _opendistro/_ism/explain/data2 { "data2" : { "index.opendistro.index_state_management.policy_id" : "policy1" } }
Open Distro will execute an initialization process to fill the policy content in the record. The following figure shows the initialized data.
Figure 3 Initialized data
After the initialization, min_index_age in the policy will be copied.
The initialized index uses a copy of this policy. The policy update will not take effect on the index.
- After the policy is modified, call the change_policy API to update the policy.
POST _opendistro/_ism/change_policy/data1 { "policy_id": "policy1" }
Functions FAQs
- How Do I Use Elasticsearch Custom Scoring to Query Data?
- Can I Migrate CSS Data to Other Tenants?
- How Do I Configure the Threshold for CSS Slow Query Logs?
- How Do I Update the CSS Lifecycle Policy?
- How Do I Set the Numbers of Index Copies to 0 in Batches?
- How Do I Specify Multiple Indexes When Creating Snapshots?
- How Can I Find All Snapshots in an OBS Bucket When I Create a Snapshot for a CSS Cluster?
- Does CSS Create Full or Incremental Snapshots for Clusters?
- If a CSS Cluster Snapshot Is Restored to Another Cluster, Will the Indexes of the Destination Cluster Be Overwritten?
- How Do I Query Snapshot Information?
- Can I Restore a Deleted Cluster?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
more