Index blocks
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Generally available
Elastic Cloud Serverless projects restrict the available Elasticsearch settings to a supported subset, identified with a Serverless badge next to the setting name. For a complete list of available index settings, refer to the Serverless index settings list.
Index blocks limit the kind of operations that are available on a certain index. The blocks come in different flavours, allowing to block write, read, or metadata operations. The blocks can be set / removed using dynamic index settings, or can be added using a dedicated API, which also ensures for write blocks that, once successfully returning to the user, all shards of the index are properly accounting for the block, for example that all in-flight writes to an index have been completed after adding the write block.
The following dynamic index settings determine the blocks present on an index:
index.blocks.read_onlyElastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Generally available This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.-
Set to
trueto make the index and index metadata read only,falseto allow writes and metadata changes.When this block is enabled and writes or metadata changes are attempted, the
cluster_block_exceptionmessage returnsFORBIDDEN/5/index read-only (api). index.blocks.read_only_allow_delete-
Similar to
index.blocks.write, except that you can delete the index when this block is in place. Do not set or remove this block yourself. The disk-based shard allocator sets and removes this block automatically according to the available disk space.When this block is enabled and writes or metadata changes are attempted, the
cluster_block_exceptionmessage returnsFORBIDDEN/12/index read-only / allow delete (api).Deleting documents from an index to release resources - rather than deleting the index itself - increases the index size temporarily, and therefore may not be possible when nodes are low on disk space. When
index.blocks.read_only_allow_deleteis set totrue, deleting documents is not permitted. However, deleting the index entirely requires very little extra disk space and frees up the disk space consumed by the index almost immediately so this is still permitted.ImportantElasticsearch adds the read-only-allow-delete index block automatically when the disk utilization exceeds the flood stage watermark, and removes this block automatically when the disk utilization falls under the high watermark. See Disk-based shard allocation for more information about watermarks, and Fix watermark errors for help with resolving watermark issues.
index.blocks.readElastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Generally available This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.-
Set to
trueto disable read operations against the index.When this block is enabled and a read operation is attempted, the
cluster_block_exceptionmessage returnsFORBIDDEN/7/index read (api).
index.blocks.writeElastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Generally available This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.-
Set to
trueto disable data write operations against the index. Unlikeread_only, this setting does not affect metadata. For instance, you can adjust the settings of an index with awriteblock, but you cannot adjust the settings of an index with aread_onlyblock.When this block is enabled and a write operation is attempted, the
cluster_block_exceptionmessage returnsFORBIDDEN/8/index write (api). index.blocks.metadataElastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Generally available This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.- Set to
trueto disable index metadata reads and writes.
When this block is enabled and a read or write operation is attempted, the cluster_block_exception message returns FORBIDDEN/9/index metadata (api).