# \_bulk endpoint on index and type?

**URL:** <https://discuss.elastic.co/t/-bulk-endpoint-on-index-and-type/5518>\
**Category:** Elasticsearch\
**Created:** [October 5, 2011, 1:33am UTC](https://discuss.elastic.co/t/-bulk-endpoint-on-index-and-type/5518 "2011-10-05T01:33:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Farrell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_farrell/32/3337_2.png) [@Gabriel\_Farrell](https://discuss.elastic.co/u/Gabriel_Farrell)\
**Post date:** [October 5, 2011, 1:33am UTC](https://discuss.elastic.co/t/-bulk-endpoint-on-index-and-type/5518/1 "2011-10-05T01:33:16Z")

</div>

I have a case where I load incoming bulk data into a different index  
each time, depending on which one is available. I know I could alter  
each action\_and\_meta\_data statement in the post data to point at that  
index, but I'd rather just use an endpoint like /my\_index/\_bulk (and  
possibly even /my\_index/my\_type/\_bulk).

Would it be possible to extend the API in this way? If so, can others  
see some use in this? When the index and type are included in the URI,  
I would expect "\_index" and "\_type" specifications in  
action\_and\_meta\_data to be ignored.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 5, 2011, 9:57am UTC](https://discuss.elastic.co/t/-bulk-endpoint-on-index-and-type/5518/2 "2011-10-05T09:57:44Z")

</div>

Yes, definitely, we can have \_bulk endport on an index, and in index/type.  
Can you open an issue?

On Wed, Oct 5, 2011 at 3:33 AM, Gabriel Farrell [gsf747@gmail.com](mailto:gsf747@gmail.com) wrote:

> I have a case where I load incoming bulk data into a different index  
> each time, depending on which one is available. I know I could alter  
> each action\_and\_meta\_data statement in the post data to point at that  
> index, but I'd rather just use an endpoint like /my\_index/\_bulk (and  
> possibly even /my\_index/my\_type/\_bulk).
> 
> Would it be possible to extend the API in this way? If so, can others  
> see some use in this? When the index and type are included in the URI,  
> I would expect "\_index" and "\_type" specifications in  
> action\_and\_meta\_data to be ignored.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 5, 2011, 11:03am UTC](https://discuss.elastic.co/t/-bulk-endpoint-on-index-and-type/5518/3 "2011-10-05T11:03:08Z")

</div>

Opened an issue: [REST Bulk API: Allow to execute \_bulk against /{index}/\_bulk and /{index}/{type}/\_bulk endpoints · Issue #1375 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1375),  
will push it shortly.

On Wed, Oct 5, 2011 at 11:57 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Yes, definitely, we can have \_bulk endport on an index, and in index/type.  
> Can you open an issue?
> 
> On Wed, Oct 5, 2011 at 3:33 AM, Gabriel Farrell [gsf747@gmail.com](mailto:gsf747@gmail.com) wrote:
> 
> > I have a case where I load incoming bulk data into a different index  
> > each time, depending on which one is available. I know I could alter  
> > each action\_and\_meta\_data statement in the post data to point at that  
> > index, but I'd rather just use an endpoint like /my\_index/\_bulk (and  
> > possibly even /my\_index/my\_type/\_bulk).
> > 
> > Would it be possible to extend the API in this way? If so, can others  
> > see some use in this? When the index and type are included in the URI,  
> > I would expect "\_index" and "\_type" specifications in  
> > action\_and\_meta\_data to be ignored.

---

<div class="post-metadata">

**Author:** ![Gabriel\_Farrell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_farrell/32/3337_2.png) [@Gabriel\_Farrell](https://discuss.elastic.co/u/Gabriel_Farrell)\
**Post date:** [October 5, 2011, 12:27pm UTC](https://discuss.elastic.co/t/-bulk-endpoint-on-index-and-type/5518/4 "2011-10-05T12:27:22Z")

</div>

Fantastic! Thanks.

On Wed, Oct 5, 2011 at 7:03 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Opened an issue: [REST Bulk API: Allow to execute \_bulk against /{index}/\_bulk and /{index}/{type}/\_bulk endpoints · Issue #1375 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1375),  
> will push it shortly.
> 
> On Wed, Oct 5, 2011 at 11:57 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Yes, definitely, we can have \_bulk endport on an index, and in index/type.  
> > Can you open an issue?
> > 
> > On Wed, Oct 5, 2011 at 3:33 AM, Gabriel Farrell [gsf747@gmail.com](mailto:gsf747@gmail.com) wrote:
> > 
> > > I have a case where I load incoming bulk data into a different index  
> > > each time, depending on which one is available. I know I could alter  
> > > each action\_and\_meta\_data statement in the post data to point at that  
> > > index, but I'd rather just use an endpoint like /my\_index/\_bulk (and  
> > > possibly even /my\_index/my\_type/\_bulk).
> > > 
> > > Would it be possible to extend the API in this way? If so, can others  
> > > see some use in this? When the index and type are included in the URI,  
> > > I would expect "\_index" and "\_type" specifications in  
> > > action\_and\_meta\_data to be ignored.

---

<div class="post-metadata">

**Author:** ![Tarun\_Jangra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_jangra/32/1426_2.png) [@Tarun\_Jangra](https://discuss.elastic.co/u/Tarun_Jangra)\
**Post date:** [October 5, 2011, 1:25pm UTC](https://discuss.elastic.co/t/-bulk-endpoint-on-index-and-type/5518/5 "2011-10-05T13:25:24Z")

</div>

It would be really handy.

---

<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:52am UTC](https://discuss.elastic.co/t/-bulk-endpoint-on-index-and-type/5518/6 "2017-07-06T03:52:46Z")

</div>


