_bulk endpoint on index and type?


(Gabriel Farrell) #1

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.


(Shay Banon) #2

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 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.


(Shay Banon) #3

Opened an issue: 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 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 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.


(Gabriel Farrell) #4

Fantastic! Thanks.

On Wed, Oct 5, 2011 at 7:03 AM, Shay Banon kimchy@gmail.com wrote:

Opened an issue: 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 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 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.


(Tarun Jangra) #5

It would be really handy.


(system) #6