Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Elasticsearch service: Disable index auto creation (auto_create_index)

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html mentions that auto creation of index can be disabled by

Automatic index creation can be disabled by setting action.auto_create_index to false in the config file of all nodes.

How can this be done in Elasticsearch as a service using the Java AWSElasticsearchClient class or in any other way?

like image 519
H1101 Avatar asked Nov 03 '15 03:11

H1101


People also ask

Does Elasticsearch create indexes automatically?

By default, Elasticsearch has a feature that will automatically create indices. Simply pushing data into a non-existing index will cause that index to be created with mappings inferred from the data.

How do I create an index pattern in Elasticsearch?

Open the main menu, then click to Stack Management > Index Patterns. Click Create index pattern. Start typing in the Index pattern field, and Kibana looks for the names of indices, data streams, and aliases that match your input.


1 Answers

It is presently not possible to do this through the console. There is no option in the Configure Domain screen (even under Advanced options)

What you can do is

   curl -X PUT "'https://<blah>.ca-central-1.es.amazonaws.com/_cluster/settings" -H 'Content-Type: application/json' -d'
{
    "persistent": {
        "action.auto_create_index": "false" 
    }
}
'

to set the cluster settings as documented in https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-index_.html#index-creation

like image 189
Archimedes Trajano Avatar answered Oct 04 '22 07:10

Archimedes Trajano