Elasticsearch Index Maintenance Script