{"issue":{"state":"open","created_at":"2011-11-10T20:30:27Z","updated_at":"2011-12-08T23:11:11Z","comments":3,"user":{"gravatar_id":"1dba3a98bab675f9e075d1719d2ddf72","id":244900,"url":"https://api.github.com/users/ruflin","avatar_url":"https://secure.gravatar.com/avatar/1dba3a98bab675f9e075d1719d2ddf72?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"ruflin"},"body":"It should be possible to set an Index in elasticsearch to readyOnly, so no new documents can be added.\r\n\r\nSome more details can be found here in the forum post:\r\nhttps://groups.google.com/forum/?pli=1#!searchin/elasticsearch/readonly/elasticsearch/ylsKoQhLstk/xtnrH_LCpuIJ","assignee":null,"id":2202358,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":1452,"title":"Set ES index to read only","html_url":"https://github.com/elasticsearch/elasticsearch/issues/1452","closed_at":null,"url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/1452","milestone":null},"action":"created","comment":{"created_at":"2011-12-08T23:11:11Z","updated_at":"2011-12-08T23:11:11Z","user":{"gravatar_id":"5b9ac9579b481efb8b1bb9c95fc2e722","id":952080,"url":"https://api.github.com/users/bbgordonn","avatar_url":"https://secure.gravatar.com/avatar/5b9ac9579b481efb8b1bb9c95fc2e722?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"bbgordonn"},"body":"This would be useful for e.g. updating to a new major version (e.g. 0.18 to 0.19): mark all indices read-only, take half the cluster offline and upgrade it, restart, and repeat for the other half. Searches can proceed against both halves so availability is maintained but no new new documents or deletes can occur in half while they are disconnected.\r\n\r\nThis patch seems to basically work as a proof of concept. Of course, I don't know if this is the approach that should be taken--feel free to tell me it's completely wrong! It adds a new cluster block for the index when the index.read_only setting is true.\r\n\r\nhttps://gist.github.com/f089f90787e5a691668d","id":3071829,"url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/comments/3071829"}}