Hi,
I am marked indices read_only and after apply force merge operation that same indices. i am getting below error. i am doing below steps. please help me.
Step1: GET my_indices/_settings
{
"my_indices" : {
"settings" : {
"index" : {
"creation_date" : "1554723807184",
"number_of_shards" : "1",
"number_of_replicas" : "2",
"uuid" : "s080nZ7nSKGSfLg_9_53rQ",
"version" : {
"created" : "6050499"
},
"provided_name" : "my_indices"
}
}
}
}
Step2: PUT my_indices/_settings
{
"index": {
"blocks.read_only": true
}
}
{
"my_indices" : {
"settings" : {
"index" : {
"number_of_shards" : "1",
"blocks" : {
"read_only" : "true"
},
"provided_name" : "my_indices",
"creation_date" : "1554723807184",
"number_of_replicas" : "2",
"uuid" : "s080nZ7nSKGSfLg_9_53rQ",
"version" : {
"created" : "6050499"
}
}
}
}
}
Step3: POST /my_indices/_forcemerge?max_num_segments=1
"error": {
"root_cause": [
{
"type": "cluster_block_exception",
"reason": "blocked by: [FORBIDDEN/5/index read-only (api)];"
}
],
"type": "cluster_block_exception",
"reason": "blocked by: [FORBIDDEN/5/index read-only (api)];"
},
"status": 403
}
Thanks,
gnanendra