目錄

ElasticSearch 維運 - Change Alias Pointer

Change Alias Pointer

The alias is your writer enterance, sometimes if you need to change the alias pointer to different concrete indices.

Run Step 1. Create the new target concrete indices

PUT /test_new_target_indices

Run Step2. Change pointer

警告
Update old indices is_write_index to false, the new one to true
POST /_aliases
{
    "actions" : [
        {
            "add" : {
                 "index" : "qlog-f-vbs-202104-0430-000006",
                 "alias" : "qlog-f-vbs-202104",
                 "is_write_index" : false
            }
        },
        {
            "add" : {
                 "index" : "test_new_target_indices",
                 "alias" : "qlog-f-vbs-202104",
                 "is_write_index" : true
            }
        }
    ]
}