Closing a large group of indices

for index in `cat somefile`; do echo -n "$index: "; curl -XPOST http://yourserver:9200/$index/_close ; echo; done

Automatically close indices

git clone https://github.com/elasticsearch/curator.git
pip install -r requirements.txt
./run_curator.py --dry-run --host localhost close indices --older-than 7 --time-unit days --timestring %Y.%m.%d