`action.auto_create_index` controls whether Elasticsearch may create a missing index when a request writes to it. It is enabled by default. Set it to `false` when indexes should be created deliberately with predefined mappings, shard choices, aliases, or other settings instead of appearing on demand. section 5.1.1 section 6.2
Block implicit index creation
Disable automatic creation cluster-wide with a persistent setting: PUT _cluster/settings { "persistent": { "action.auto_create_index": false } } Afterward, a request such as `PUT my_new_index/_doc/1` fails if `my_new_index` does not already exist. Create the index first, then index documents into it. section 5.1.1 section 6.2.1
Use `persistent` when the choice should survive an Elasticsearch restart. A `transient` cluster setting lasts only until the next server reboot. section 6.2.1
Listing 6.2 Disabling automatic creation of indexes
PUT _cluster/settings #1
{
"persistent": { #2
"action.auto_create_index":false #3
}
}
This request applies the binary cluster-wide setting. It is useful when every index must be provisioned before documents arrive. section 6.2.1
Turning the feature off completely can be too restrictive: applications and Kibana may need to create administrative indexes, including hidden indexes whose names begin with a dot. Prefer selective rules when only some index names need automatic creation. section 6.2.1
action.auto_create_index: [".admin*, cars*, "*books*", "-x*","-y*","+z*"]
A comma-separated rule list can allow automatic creation for matching names and disallow it for names prefixed with `-`; `+` marks allowed patterns. section 6.2.1
This setting protects index design rather than document overwrites. Use the `_create` endpoint when a document must not replace an existing document; use explicit index-creation APIs when mappings, shards, replicas, compression, or aliases need to be chosen up front. section 5.1.1 section 6.2
