Creating an index and alias in the same request

Hi,

Is there anyway to create an index and set an alias name on it with only
one request ?
Something like :
curl -XPUT http://localhost:9200/twitter/ -d '

{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 2
},
"alias": [
"myalias"
]
}

'

Thanks,
David.

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

No, there ins't an option to do so (at least not for a complex alias, with routing and other parameters). You can open an issue...

On Friday, February 10, 2012 at 2:54 PM, david@pilato.fr wrote:

Hi,

Is there anyway to create an index and set an alias name on it with only one request ?

Something like :

curl -XPUT http://localhost:9200/twitter/ -d '

{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 2
},
"alias": [
"myalias"
]
}
'

Thanks,

David.

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

Ok thanks. Issue opened here : https://github.com/elasticsearch/elasticsearch/issues/1695

I would be pleased to try to implement it. Could you give an advice on some classes I should look at to start ?

Thanks,
David.

De : elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com] De la part de Shay Banon
Envoyé : dimanche 12 février 2012 14:35
À : elasticsearch@googlegroups.com
Objet : Re: Creating an index and alias in the same request

No, there ins't an option to do so (at least not for a complex alias, with routing and other parameters). You can open an issue...

On Friday, February 10, 2012 at 2:54 PM, david@pilato.fr wrote:

Hi,

Is there anyway to create an index and set an alias name on it with only one request ?

Something like :

curl -XPUT http://localhost:9200/twitter/ -d '

{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 2
},
"alias": [
"myalias"
]
}

'

Thanks,

David.

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

Lets talk it over on the issue.

On Sunday, February 12, 2012 at 3:59 PM, David Pilato wrote:

Ok thanks. Issue opened here : Creating an index and alias in the same request · Issue #1695 · elastic/elasticsearch · GitHub

I would be pleased to try to implement it. Could you give an advice on some classes I should look at to start ?

Thanks,
David.

De : elasticsearch@googlegroups.com [mailto:elasticsearch@googlegroups.com] De la part de Shay Banon
Envoyé : dimanche 12 février 2012 14:35
À : elasticsearch@googlegroups.com (mailto:elasticsearch@googlegroups.com)
Objet : Re: Creating an index and alias in the same request

No, there ins't an option to do so (at least not for a complex alias, with routing and other parameters). You can open an issue...

On Friday, February 10, 2012 at 2:54 PM, david@pilato.fr (mailto:david@pilato.fr) wrote:

Hi,

Is there anyway to create an index and set an alias name on it with only one request ?

Something like :

curl -XPUT http://localhost:9200/twitter/ -d '

{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 2
},
"alias": [
"myalias"
]
}
'

Thanks,

David.

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet