# What is differentce between index and create bulk commands?

**URL:** https://discuss.elastic.co/t/what-is-differentce-between-index-and-create-bulk-commands/6317
**Category:** Elasticsearch
**Created:** [January 9, 2012, 4:41am UTC](https://discuss.elastic.co/t/what-is-differentce-between-index-and-create-bulk-commands/6317 "2012-01-09T04:41:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)
#### Post date: [January 9, 2012, 4:41am UTC](https://discuss.elastic.co/t/what-is-differentce-between-index-and-create-bulk-commands/6317/1 "2012-01-09T04:41:47Z")

</div>

Hi

I'm confuse using index and create bulk command.

> <https://github.com/elastic/elasticsearch-river-rabbitmq/blob/master/README.md>

{ "index" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" : "1" } }  
{ "tweet" : { "text" : "this is a tweet" } }

{ "create" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" :  
"1" } }  
{ "tweet" : { "text" : "another tweet" } }

when used index or create and what effect happen when using both of  
them.

Thanks

---

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [January 9, 2012, 6:14am UTC](https://discuss.elastic.co/t/what-is-differentce-between-index-and-create-bulk-commands/6317/2 "2012-01-09T06:14:23Z")

</div>

Hi,

create means that the document is indexed _only_ if it does not exists in  
the index yet (recognized by its "\_id"), otherwise it will fail.

See "Operation Type" in

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Regards,  
Lukas

On Mon, Jan 9, 2012 at 5:41 AM, sam [mishra.sameek@gmail.com](mailto:mishra.sameek@gmail.com) wrote:

> Hi
> 
> I'm confuse using index and create bulk command.
> 
> [https://github.com/elasticsearch/elasticsearch-river-rabbitmq/blob/master/README.md](https://github.com/elasticsearch/elasticsearch-river-rabbitmq/blob/master/README.md)
> 
> { "index" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" : "1" } }  
> { "tweet" : { "text" : "this is a tweet" } }
> 
> { "create" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" :  
> "1" } }  
> { "tweet" : { "text" : "another tweet" } }
> 
> when used index or create and what effect happen when using both of  
> them.
> 
> Thanks

---

<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, 3:43am UTC](https://discuss.elastic.co/t/what-is-differentce-between-index-and-create-bulk-commands/6317/3 "2017-07-06T03:43:27Z")

</div>


