5
votes

How to disable automatic detection for all indices globally in elasticsearch ? I have found that disabling for a single index is possible by dynamic mapping ( Source : https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-field-mapping.html )

But I want to do it globally by some command in elasticsearch.yml. Is there any way to do this ?

1

1 Answers

0
votes

I've resolved it by changing a global Elasticsearch template (check, if you allready have there any important setting in the global template, that you would like to keep, then you would also need to copy paste them here in json):

curl -X PUT "$HOSTNAME:9200/_template/global?pretty" -H 'Content-Type: application/json' -d'
{
    "index_patterns" : ["logstash-*"], ####here your index pattern for the setting####
    "order" : 0,
    "mappings": {
      "doc": {
        "date_detection": false
      }
    } 
}'