Hi Honza, sadly, this doesn't seem to work.
Comparing the results from 0.90 vs 1.0.1 from the _bulk api: {"took":345,"items":[{"index":{"_index":"test","_type":"type1","_id":"1","_version":1,"ok":true}},{"delete":{"_index":"test","_type":"type1","_id":"2","_version":1,"ok":true}},{"create":{"_index":"test","_type":"type1","_id":"3","_version":1,"ok":true}},{"update":{"_index":"index1","_type":"type1","_id":"1","error":"DocumentMissingException[[index1][-1] [type1][1]: document missing]"}}]} {"took":256,"errors":true,"items":[{"index":{"_index":"test","_type":"type1","_id":"1","_version":1,"status":201}},{"delete":{"_index":"test","_type":"type1","_id":"2","_version":1,"status":404,"found":false}},{"create":{"_index":"test","_type":"type1","_id":"3","_version":1,"status":201}},{"update":{"_index":"index1","_type":"type1","_id":"1","status":404,"error":"DocumentMissingException[[index1][-1] [type1][1]: document missing]"}}]} it seems that pre 1.0 ES doesn't send status, and https://github.com/elasticsearch/elasticsearch-py/blob/master/elasticsearch/helpers/__init__.py#L108 backs the lacking status responses up with 500 error codes. So basically all my inserts fails. I like the API, though. RFE: the docs should talk about the return values of APIs, I basically had to trial and error those. Axel Am Samstag, 12. April 2014 02:03:24 UTC+2 schrieb Honza Král: > > Hi axel, > > If you are using python you can just use the python client > (elasticsearch-py) it will shield you from this. Just have a look at the > bulk and streaming_bulk helpers in the library. > > Hope this helps, > Honza > On Apr 11, 2014 7:52 PM, <ax...@mozilla.com <javascript:>> wrote: > >> Thanks for the response. >> >> My code's in python on top of the rest api, I fail to map the java code >> over :-/ >> >> Axel >> >> On Friday, April 11, 2014 4:14:10 PM UTC+2, ax...@mozilla.com wrote: >>> >>> Hi, >>> >>> in my current code, I check "ok": true to see if all my inserts in a >>> bulk call succeeded. >>> >>> Now, with 1.0, "ok" is gone. Is there a recommended way to check the >>> results of individual commands inside a bulk api call? Notably, inserts? >>> >>> Preferably something that works both pre and post 1.0. >>> >>> Thanks >>> >>> Axel >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "elasticsearch" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to elasticsearc...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elasticsearch/869ecb66-2388-4a42-ac6d-f2adb3befd19%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/869ecb66-2388-4a42-ac6d-f2adb3befd19%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2b3e1512-c9ff-420a-bbc8-97d4d8d078d0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.