You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import asyncio
from elasticsearch import AsyncElasticsearch
from elasticsearch.helpers import async_bulk
es = AsyncElasticsearch()
async def gendata():
mywords = ['foo', 'bar', 'baz']
for word in mywords:
yield {
"_index": "mywords",
"word": word,
}
async def main():
async for ok, result in async_streaming_bulk(es, gendata()):
action, result = result.popitem()
if not ok:
print("failed to %s document %s" % ())
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
but neither actions nor result contains information about the original event.
How can i get error events?
The text was updated successfully, but these errors were encountered:
bralbral
changed the title
Is there way get errors actions from elasticsearch.helpers.*bulk ?
Is there way get error actions from elasticsearch.helpers.*bulk ?
Feb 6, 2022
Currently there's no way to get this information from the returned error, this would be good to have though. I'm going to convert this into a feature suggestion issue.
sethmlarson
changed the title
Is there way get error actions from elasticsearch.helpers.*bulk ?
Make failing document available when using the bulk helper
Feb 17, 2022
According to documentation :
but neither actions nor result contains information about the original event.
How can i get error events?
The text was updated successfully, but these errors were encountered: