Hello,
I'm having some problems using the Bulk API because it is lying in the response it returns.
I'm using the following request:
POST /_bulk?refresh=true
{ "index": { "_index": "my_index", "_id": 123 } },
{ "internal_id": 123, "attr1": "value1", "attr2": "value2", ... }
And I'm getting the response below:
{
"took": 16,
"errors": false,
"items": [
{
"index": {
"_index": "my_index",
"_type": "_doc",
"_id": "123",
"_version": 1,
"result": "created",
"forced_refresh": true,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"_seq_no": 21744,
"_primary_term": 3,
"status": 201
}
}
]
}
That looks great but the actual issue is that when I go to "my_index" a search for document with id 123, there is no document.
In fact, the number of documents of the index does not change.
The "funny" thing is that this behaviour only happens when I launch the request from a Google Cloud Function but if I launch exactly the same request from my local computer, the document is successfully indexed.
Can anyone help me to identify the problem? I'm going crazy...
Thanks in advance!