Hello,
I have been able to get "helpers.parallel_bulk" in Python (v3) to insert new json records using the the format below (array of JSON records):
[{'_id': 'AVyPTQ2d82rj_AUAq9dc', '_type': 'mytype', '_index': 'myindex-2017.06.10', 'starttime': '2017-06-09T23:59:48.670430Z', 'src': '192.168.0.5', 'sport': 4570, etc ... }
{'_id': 'AVyPTQ2d82rj_AUAq9db', '_type': 'mytype', '_index': 'myindex-2017.06.10', 'starttime': '2017-06-09T23:59:48.670430Z', 'src': '192.168.0.10', 'sport': 3463, etc ... }
{'_id': 'AVyPTQ2d82rj_AUAq9da', '_type': 'mytype', '_index': 'myindex-2017.06.10', 'starttime': '2017-06-09T23:59:48.670430Z', 'src': '192.168.0.11', 'sport': 4987, etc ... }
etc.]
The problem is that the format seems quite different than the bulk update documentation. Namely:
[{"index": {"id": "AVyKQdW282rj_AUAqK4", "_type": "mytype", "_index": "myindex-2017.06.09"}}
{'starttime': '2017-06-09T23:59:48.670430Z', 'src': '192.168.0.11', 'sport': 4987, etc ... }
{"index": {"_id": "AVyKRJ1a82rj_AUAqLGR", "_type": "mytype", "_index": "myindex-2017.06.09"}}
{'starttime': '2017-06-09T23:59:48.670430Z', 'src': '192.168.0.11', 'sport': 4987, etc ... }
etc.]
The issue is that I want to be able to update and index records in the same parallel_bulk request. What is the correct JSON format that I should be using to distinguish between an index, create, update, and delete for each record?
Thanks!