elasticsearch - enabling TTL on an entire index -
question pretty straight forward, there way enable ttl on index level. means types created under index inherit enabled ttl. on documentation said "you can provide per index/type default _ttl value follows", wasn't able request ttl on index level.
in case isn't possible, workaround can suggested ? in our environment new types created time, , data has removed after not needed anymore.
you can accomplish using default option under mapping. under index , if put configuration under_default_ applied mappings these configurations not defined under same index.
curl -xput "http://localhost:9200/test_index" -d'{ "mappings": { "_default_": { "_ttl": { "enabled": true } } } }'
Comments
Post a Comment