# Difference between index and create in bulk API?

**URL:** https://discuss.elastic.co/t/difference-between-index-and-create-in-bulk-api/6067
**Category:** Elasticsearch
**Created:** [December 5, 2011, 11:01am UTC](https://discuss.elastic.co/t/difference-between-index-and-create-in-bulk-api/6067 "2011-12-05T11:01:31Z")
**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: [December 5, 2011, 11:01am UTC](https://discuss.elastic.co/t/difference-between-index-and-create-in-bulk-api/6067/1 "2011-12-05T11:01:31Z")

</div>

Hi

I have read following reference guide  
[http://www.elasticsearch.org/guide/reference/river/rabbitmq.html](http://www.elasticsearch.org/guide/reference/river/rabbitmq.html)  
where bulk API format define as:

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

I have doubt regarding using both index and create because both having  
same parameters,so please explain what is difference between index  
and create,both are used for create index or other reason using both.  
it is required to use both for create index or any one can used for  
creating index.

Thanks

---

<div class="post-metadata">

### Author: ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)
#### Post date: [December 5, 2011, 12:17pm UTC](https://discuss.elastic.co/t/difference-between-index-and-create-in-bulk-api/6067/2 "2011-12-05T12:17:59Z")

</div>

Hi Same

> I have read following reference guide  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/river/rabbitmq.html)  
> where bulk API format define as:
> 
> { "index" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" : "1" } }  
> { "tweet" : { "text" : "this is a tweet" } }  
> { "delete" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" :  
> "2" } }  
> { "create" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" :  
> "1" } }  
> { "tweet" : { "text" : "another tweet" } }
> 
> I have doubt regarding using both index and create because both having  
> same parameters,so please explain what is difference between index  
> and create,both are used for create index or other reason using both.  
> it is required to use both for create index or any one can used for  
> creating index.

Neither is used to create an index (although they may do so as a  
side-effect of inserting the first document into a new index).

"index" indexes a document. "create" only indexes a document if it  
doesn't already exist. It used to be that "create" was faster if you  
knew that your docs didn't already exist. But now, since versioning was  
added, "index" performs as well as "create"

clint

---

<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:46am UTC](https://discuss.elastic.co/t/difference-between-index-and-create-in-bulk-api/6067/3 "2017-07-06T03:46:25Z")

</div>


