Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ElasticSearch bulk operation - omit response

I was just wondering if there was any parameter / method to make a bulk request through the ElasticSearch REST api without a response being returned.

Trying to squeeze as much network performance as I can out of it, and I don't care about the result of the bulk operations in my use-case. Since I am rapidly inserting in batches of 20,000 at the moment I imagine I would save a decent amount of data transfer overhead by omitting them.

like image 756
pospi Avatar asked Oct 20 '22 00:10

pospi


1 Answers

I know I'm replying to an old question here, but I faced the same question and found this page.

I'm not sure if this is something new in Elasticsearch since the question was asked, but you can use the "filter_path" query parameter: See the API docs

If you add "?filter_path=took,errors" to your "_bulk" query, the "items" are omitted from the response.

like image 69
asgerix Avatar answered Oct 27 '22 09:10

asgerix