{"id":390,"date":"2022-08-05T10:11:45","date_gmt":"2022-08-05T10:11:45","guid":{"rendered":"http:\/\/192.168.1.102\/?p=390"},"modified":"2022-10-19T18:27:42","modified_gmt":"2022-10-19T18:27:42","slug":"index-lifecycle-management","status":"publish","type":"post","link":"https:\/\/192.168.12.139\/blog\/index-lifecycle-management","title":{"rendered":"Index Lifecycle Management"},"content":{"rendered":"

Features<\/h2>\n

1. Overview<\/a><\/p>\n

2. Basics<\/a><\/p>\n

2.1 Phases<\/a><\/p>\n

2.2 Segment<\/a><\/p>\n

2.3 Rollover<\/a><\/p>\n

2.4 Merge<\/a><\/p>\n

2.5 Shrink<\/a><\/p>\n

2.6 Searchable Snapshots<\/a><\/p>\n

2.7 Fully Mounted Index<\/a><\/p>\n

2.8 Partially Mounted Index<\/a><\/p>\n

2.9 Index Priority<\/a><\/p>\n

2.10 Wait for Snapshot<\/a><\/p>\n

2.11 Some Design Considerations<\/a><\/p>\n

<\/a><\/p>\n

1. Overview<\/h2>\n

Indices don’t have an infinite lifetime like us humans, and they shouldn’t have. They are created, live, and die when their service is appreciated.<\/p>\n

Indices need to be managed in favor of performance and stability. An oversized<\/em> index<\/em> causes some problems further down the road. Indices’ lifecycles are managed by Index Lifecycle Management (ILM) policies<\/strong>. <\/span><\/p>\n

Policies<\/em> decide when to create a new index, rollover<\/em> an index depending on the configuration, transition<\/em> of indices from one phase<\/em> to another such as hot<\/em>, warm<\/em>, and cold<\/em>, and a retention period<\/em>. So after a while, a determined time period (retention period) an index will be deleted.<\/span><\/p>\n

<\/a><\/p>\n

2. Basics<\/span><\/h2>\n

Let’s start by making clear some terms and actions.<\/span><\/p>\n

<\/a><\/p>\n

2.1. Phases<\/span><\/h3>\n

Hot:<\/span><\/strong><\/span> Read and write operations run in this phase. Documents are updated, deleted, created, or queried.<\/span><\/p>\n

Warm:<\/span><\/strong><\/span> The index can still be updated but less likely, and can be queried.<\/span><\/p>\n

Cold:<\/span><\/strong><\/span> Relative slower queries when compared to hot and warm tiers.<\/span><\/p>\n

Frozen:<\/span><\/strong><\/span> The indices which are needed to be searched less frequently than the cold tier in this phase. It takes longer to search this tier than the cold tier. Used for old indices.<\/span><\/p>\n

Delete:<\/span><\/strong><\/span> The indices that come to the end of the line will rest their final times in this phase. After their defined retention age they will be gone for good.<\/span><\/p>\n

\n

Data stream indices automatically use the hot tier<\/span><\/p>\n<\/blockquote>\n

\"\"<\/a><\/p>\n

<\/a><\/p>\n

2.2. Segment<\/h3>\n