-
Notifications
You must be signed in to change notification settings - Fork 65
Bulk API not working #73
Copy link
Copy link
Open
Description
I am attempting to bulk create a few documents by passing this to bulk:
{"create": {"customer_id": 1, "field2": "doc1", "_index": "my_index"}}
{"create": {"customer_id": 1, "field2": "doc2", "_index": "my_index"}}It always returns this:
{
"errors": false,
"items": []
}Stepping through things in a debugger takes me into fake_elasticsearch.py where I can see the documents are never added to the internal dictionary. It's almost as if some indentation got messed up.
It goes into this block:
if any(action in line for action in ['index', 'create', 'update', 'delete']):
-- SNIP! --...which makes sure the index exists:
if index not in self.__documents_dict:
self.__documents_dict[index] = list()So far, so good. But that's where it stops. I mean, everything else that needs to happen is found underneath the following else clause - in particular, the creation of the item and adding it to both the self.__documents_dict[index] and to the items list.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels