# Updating several indices at once

**URL:** <https://discuss.elastic.co/t/updating-several-indices-at-once/22132>\
**Category:** Elasticsearch\
**Created:** [February 12, 2015, 12:53pm UTC](https://discuss.elastic.co/t/updating-several-indices-at-once/22132 "2015-02-12T12:53:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aldian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aldian/32/906_2.png) [@Aldian](https://discuss.elastic.co/u/Aldian)\
**Post date:** [February 12, 2015, 12:53pm UTC](https://discuss.elastic.co/t/updating-several-indices-at-once/22132/1 "2015-02-12T12:53:38Z")

</div>

Hi

Today I tried the following request, which worked great:  
curl -XPUT 'localhost:9200/logstash-2014.03.24/\_settings' -d '  
{  
"index" : {  
"number\_of\_replicas" : 0  
}  
}'

Now I want to set number of replicas for every indice in 2014 to 0. Can I  
use a wildcard in the url such as the following? :  
curl -XPUT 'localhost:9200/logstash-2014.\*/\_settings' -d '  
{  
"index" : {  
"number\_of\_replicas" : 0  
}  
}'

Or do I have to make a shell script that will iterate over all the dates?

Thanks for your help

Aldian

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/174155d7-6133-40f0-9d8f-c340971f1f44%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/174155d7-6133-40f0-9d8f-c340971f1f44%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 12, 2015, 9:41pm UTC](https://discuss.elastic.co/t/updating-several-indices-at-once/22132/2 "2015-02-12T21:41:58Z")

</div>

You can use wildcards, you can also comma separate them eg - curl -XPUT  
'localhost:9200/logstash-2014.01.01,logstash-2014.01.02/\_settings

On 12 February 2015 at 23:53, Aldian [aldian.gp@gmail.com](mailto:aldian.gp@gmail.com) wrote:

> Hi
> 
> Today I tried the following request, which worked great:  
> curl -XPUT 'localhost:9200/logstash-2014.03.24/\_settings' -d '  
> {  
> "index" : {  
> "number\_of\_replicas" : 0  
> }  
> }'
> 
> Now I want to set number of replicas for every indice in 2014 to 0. Can I  
> use a wildcard in the url such as the following? :  
> curl -XPUT 'localhost:9200/logstash-2014.\*/\_settings' -d '  
> {  
> "index" : {  
> "number\_of\_replicas" : 0  
> }  
> }'
> 
> Or do I have to make a shell script that will iterate over all the dates?
> 
> Thanks for your help
> 
> Aldian
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/174155d7-6133-40f0-9d8f-c340971f1f44%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/174155d7-6133-40f0-9d8f-c340971f1f44%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/174155d7-6133-40f0-9d8f-c340971f1f44%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/174155d7-6133-40f0-9d8f-c340971f1f44%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_2PH07k%2BjkU4arAC6FxNRQJxZM9FQpw97u\_ob5JOpxvQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_2PH07k%2BjkU4arAC6FxNRQJxZM9FQpw97u_ob5JOpxvQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:33am UTC](https://discuss.elastic.co/t/updating-several-indices-at-once/22132/3 "2017-07-06T00:33:06Z")

</div>


