question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bulk() and streaming_bulk() helpers don't apply the `ignore` argument to op results

See original GitHub issue

The documentation for ignore indicates:

An API call is considered successful (and will return a response) if elasticsearch returns a 2XX response. Otherwise an instance of TransportError (or a more specific subclass) will be raised. You can see other exception and error states in Exceptions. If you do not wish an exception to be raised you can always pass in an ignore parameter with either a single status code that should be ignored or a list of them

The bulk() and streaming_bulk() helpers parameters accept the ignore argument and pass it through to the underlying API call, but don’t otherwise consider it while processing results. It would be more useful (and more consistent with how ignore works with other client methods) to apply the value to individual op results, treating ops with ignored statuses as successful.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
honzakralcommented, Dec 31, 2019

@arusahni that is a great idea, thank you! Just not sure about the best naming. But definitely doable and quite simple to do.

Reopening the issue to keep track of this.

0reactions
Sparkyczcommented, Apr 21, 2021

@sethmlarson Guess you forgot to close the issue…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Helpers — Elasticsearch 7.12.0 documentation
The parallel_bulk() api is a wrapper around the bulk() api to provide threading. parallel_bulk() returns a generator which must be consumed to produce...
Read more >
How can I get in python response for helpers.bulk function ...
If you need to process a lot of data and want to ignore/collect errors please consider using the streaming_bulk() helper which will just...
Read more >
Bulk API | Elasticsearch Guide [8.5] | Elastic
When using the HTTP API, make sure that the client does not send HTTP chunks, ... If the _source parameter is false ,...
Read more >
Elasticsearch Documentation - Read the Docs
means that there are no opinions in this client; it also means that some of the ... See the bulk() helper function for...
Read more >
Elasticsearch - How to use Python helpers to bulk load data ...
These example documents don't specify the Elasticsearch index name, because the index will be passed to the helpers.bulk() method's API call ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found