Force merge on read_only index yields error

I'm looking to manage some of our old indices by making them read only and force merging them down to one segment. According to
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html
I'm supposed to set the index to read only first so:

PUT my_index/_settings
{
"index": {
"blocks.read_only": true
}
}

at which point I received "acknowledged" : "true"

Then next I submitted:

POST my_index/_forcemerge?max_num_segments=1

at which point I had returned:

"type"=>"cluster_block_exception", "reason"=>"blocked by: [FORBIDDEN/5/index read-only / allow delete (api)];"
"status": 403

huh?
Does this mean I DON'T set the index to read_only?
Or is there something else going on?

The two nodes this particular index is on are low on disk space (which is one of the reasons I'm doing this), so I'm wondering if that is a factor.

Thanks.

Support pointed out what I missed: I'm on version 5.6.3 and the instructions I was following were for 6.x. In version 5.6.x, according to:

you do not need to make the index read only before doing a force merge.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.