# Including alias creation command while creating setting and mapping

**URL:** https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412
**Category:** Elasticsearch
**Created:** [November 14, 2013, 5:53pm UTC](https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412 "2013-11-14T17:53:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)
#### Post date: [November 14, 2013, 5:53pm UTC](https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412/1 "2013-11-14T17:53:52Z")

</div>

Hi everyone - Would you know the command which would enable me to create  
the index while I am creating settings and mapping?

Here is what I am executing:

{  
"settings": {  
...............  
},  
"mappings": {  
....  
},  
"aliases" : ["my\_alias"]  
}

however this does not work and no alias gets created. also I get no error.

thoughts?

-Amit.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 14, 2013, 5:59pm UTC](https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412/2 "2013-11-14T17:59:07Z")

</div>

I think you are looking for this: [https://github.com/elasticsearch/elasticsearch/issues/1695](https://github.com/elasticsearch/elasticsearch/issues/1695)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 14 novembre 2013 at 18:54:25, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)) a écrit:

Hi everyone - Would you know the command which would enable me to create the index while I am creating settings and mapping?

Here is what I am executing:

{  
"settings": {  
...............  
},  
"mappings": {  
....  
},  
"aliases" : ["my\_alias"]  
}

however this does not work and no alias gets created. also I get no error.

thoughts?

## -Amit.

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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)
#### Post date: [November 15, 2013, 2:38am UTC](https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412/3 "2013-11-15T02:38:17Z")

</div>

yes exactly.

David - Since it is not working for me yet, does the ordering matter?

-Amit.

On Thu, Nov 14, 2013 at 9:59 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I think you are looking for this:  
> [Creating an index and alias in the same request · Issue #1695 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1695)
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 14 novembre 2013 at 18:54:25, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)//amitsoni29@gmail.com)  
> a écrit:
> 
> Hi everyone - Would you know the command which would enable me to create  
> the index while I am creating settings and mapping?
> 
> Here is what I am executing:
> 
> {  
> "settings": {  
> ...............  
> },  
> "mappings": {  
> ....  
> },  
> "aliases" : ["my\_alias"]  
> }
> 
> however this does not work and no alias gets created. also I get no error.
> 
> thoughts?
> 
> ## -Amit.
> 
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 15, 2013, 6:26am UTC](https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412/4 "2013-11-15T06:26:10Z")

</div>

You should have notice that this issue is not closed.  
That means it's not available yet.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 15 novembre 2013 at 03:38:50, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)) a écrit:

yes exactly.

David - Since it is not working for me yet, does the ordering matter?

-Amit.

On Thu, Nov 14, 2013 at 9:59 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
I think you are looking for this: [https://github.com/elasticsearch/elasticsearch/issues/1695](https://github.com/elasticsearch/elasticsearch/issues/1695)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 14 novembre 2013 at 18:54:25, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)) a écrit:

Hi everyone - Would you know the command which would enable me to create the index while I am creating settings and mapping?

Here is what I am executing:

{  
"settings": {  
...............  
},  
"mappings": {  
....  
},  
"aliases" : ["my\_alias"]  
}

however this does not work and no alias gets created. also I get no error.

thoughts?

## -Amit.

## 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). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)
#### Post date: [November 15, 2013, 7:13am UTC](https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412/5 "2013-11-15T07:13:09Z")

</div>

Thanks David, my bad, I missed seeing that this is not closed.

-Amit.

On Thu, Nov 14, 2013 at 10:26 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> You should have notice that this issue is not closed.  
> That means it's not available yet.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 15 novembre 2013 at 03:38:50, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)//amitsoni29@gmail.com)  
> a écrit:
> 
> yes exactly.
> 
> David - Since it is not working for me yet, does the ordering matter?
> 
> -Amit.
> 
> On Thu, Nov 14, 2013 at 9:59 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > I think you are looking for this:  
> > [Creating an index and alias in the same request · Issue #1695 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1695)
> > 
> > ```
> > --
> > 
> > ```
> > 
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 14 novembre 2013 at 18:54:25, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)//amitsoni29@gmail.com)  
> > a écrit:
> > 
> > Hi everyone - Would you know the command which would enable me to  
> > create the index while I am creating settings and mapping?
> > 
> > Here is what I am executing:
> > 
> > {  
> > "settings": {  
> > ...............  
> > },  
> > "mappings": {  
> > ....  
> > },  
> > "aliases" : ["my\_alias"]  
> > }
> > 
> > however this does not work and no alias gets created. also I get no error.
> > 
> > thoughts?
> > 
> > ## -Amit.
> > 
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Guozhu\_Wei](https://avatars.discourse-cdn.com/v4/letter/g/cc9497/32.png) [@Guozhu\_Wei](https://discuss.elastic.co/u/Guozhu_Wei)
#### Post date: [November 15, 2013, 7:50am UTC](https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412/6 "2013-11-15T07:50:04Z")

</div>

Thanks!

I changed the code to test the Qos and build the plugin, now the Qos works  
and nothing lost now.

```
private class Consumer implements Runnable {

    private Connection connection;

    private Channel channel;

    @Override

    public void run() {

        while (true) {

            if (closed) {

                break;

            }

            try {

                connection =

```

connectionFactory.newConnection(rabbitAddresses);

```
                channel = connection.createChannel();

                channel.basicQos(200);

```

I didn’t dig into the code, but I think if the indexer raise an exception,  
the river should not ack the message.

Thank you for your response!

发件人: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
[[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] 代表 David Pilato  
发送时间: 2013年11月15日 14:26  
收件人: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com); Amit Soni  
主题: Re: Including alias creation command while creating setting and  
mapping

You should have notice that this issue is not closed.

That means it's not available yet.

--

David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)

[https://twitter.com/dadoonet](https://twitter.com/dadoonet) @dadoonet |  
[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) @elasticsearchfr

Le 15 novembre 2013 at 03:38:50, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)  
mailto://amitsoni29@gmail.com ) a écrit:

yes exactly.

David - Since it is not working for me yet, does the ordering matter?

-Amit.

On Thu, Nov 14, 2013 at 9:59 AM, David Pilato \<david@pilato.fr  
[mailto:david@pilato.fr](mailto:david@pilato.fr) \> wrote:

I think you are looking for this:

> <https://github.com/elastic/elasticsearch/issues/1695>

--

David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)

[https://twitter.com/dadoonet](https://twitter.com/dadoonet) @dadoonet |  
[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) @elasticsearchfr

Le 14 novembre 2013 at 18:54:25, Amit Soni ([amitsoni29@gmail.com](mailto:amitsoni29@gmail.com)  
mailto://amitsoni29@gmail.com ) a écrit:

Hi everyone - Would you know the command which would enable me to create the  
index while I am creating settings and mapping?

Here is what I am executing:

{  
"settings": {  
...............  
},  
"mappings": {  
....  
},  
"aliases" : ["my\_alias"]  
}

however this does not work and no alias gets created. also I get no error.

thoughts?

-Amit.

--  
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)  
[mailto:elasticsearch%2Bunsubscribe@googlegroups.com](mailto:elasticsearch%2Bunsubscribe@googlegroups.com) .  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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)  
[mailto:elasticsearch%2Bunsubscribe@googlegroups.com](mailto:elasticsearch%2Bunsubscribe@googlegroups.com) .  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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)  
[mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) .  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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)  
[mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) .  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:06am UTC](https://discuss.elastic.co/t/including-alias-creation-command-while-creating-setting-and-mapping/14412/7 "2017-07-06T02:06:48Z")

</div>


