# Elasticsearch: use command curl -XPUT over several indexes begining with the same word

**URL:** <https://discuss.elastic.co/t/elasticsearch-use-command-curl-xput-over-several-indexes-begining-with-the-same-word/56389>\
**Category:** Elasticsearch\
**Created:** [July 26, 2016, 11:38am UTC](https://discuss.elastic.co/t/elasticsearch-use-command-curl-xput-over-several-indexes-begining-with-the-same-word/56389 "2016-07-26T11:38:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sen](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@sen](https://discuss.elastic.co/u/sen)\
**Post date:** [July 26, 2016, 11:38am UTC](https://discuss.elastic.co/t/elasticsearch-use-command-curl-xput-over-several-indexes-begining-with-the-same-word/56389/1 "2016-07-26T11:38:09Z")

</div>

Hello folks,

I want to run the following script over several indexes called 'index1-%{+YYYY.MM.dd}:  
curl -XPUT [http://localhost:9200/index1\*](http://localhost:9200/index1*) -d '  
{  
"mappings" : {  
"index1" : {  
"properties" : {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}  
}'

But the previous script doesn't work due to '\*'.  
Do you know how to solve that ?

Regards

---

<div class="post-metadata">

**Author:** ![jpcarey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpcarey/32/46668_2.png) [@jpcarey](https://discuss.elastic.co/u/jpcarey)\
**Post date:** [July 26, 2016, 1:41pm UTC](https://discuss.elastic.co/t/elasticsearch-use-command-curl-xput-over-several-indexes-begining-with-the-same-word/56389/2 "2016-07-26T13:41:28Z")

</div>

Try single or double quotes around `'http://...*'`.

---

<div class="post-metadata">

**Author:** ![sen](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@sen](https://discuss.elastic.co/u/sen)\
**Post date:** [July 26, 2016, 3:26pm UTC](https://discuss.elastic.co/t/elasticsearch-use-command-curl-xput-over-several-indexes-begining-with-the-same-word/56389/3 "2016-07-26T15:26:55Z")

</div>

this works for me finaly

```
curl -XPUT http://localhost:9200/_template/template_name -d '

```

{  
"template": "index1\*",  
"settings": {  
....  
},  
"mappings" : {  
"name\_mapping" : {  
"properties" : {  
"geometry" : {  
"type":"geo\_shape",  
"tree":"quadtree",  
"precision":"1m"  
},  
...

---

<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 5, 2017, 10:32pm UTC](https://discuss.elastic.co/t/elasticsearch-use-command-curl-xput-over-several-indexes-begining-with-the-same-word/56389/4 "2017-07-05T22:32:49Z")

</div>


