Dear all,
I am currently working on ES 6.0, using the low rest client to communicate with an ES 6.0.
I am wondering few things, among them :
- is it possible, via the low rest client, to get a response like this one after doing a bulk request :
https://www.elastic.co/guide/en/elasticsearch/guide/current/bulk.html
{
"took": 4,
"errors": false,
"items": [
{ "delete": {
"_index": "website",
"_type": "blog",
"_id": "123",
"_version": 2,
"status": 200,
"found": true
}},
{ "create": {
"_index": "website",
"_type": "blog",
"_id": "123",
"_version": 3,
"status": 201
}},
{ "create": {
"_index": "website",
"_type": "blog",
"_id": "EiwfApScQiiy7TIKFxRCTw",
"_version": 1,
"status": 201
}},
{ "update": {
"_index": "website",
"_type": "blog",
"_id": "123",
"_version": 4,
"status": 200
}}
]
}
I currently only get a 200 OK HTTP answer (or 400 Bad Request).
- using the transport client, I can update a document, let's say a document that contains an array of phone numbers:
"phones" : [ "800800800" ]
Using the low-level rest client, I want to do the same but I get the following error :
"Malformed action/metadata line [1], expected a simple value for field [phones] but found [START_ARRAY]
Do you have any idea of what could be my mistake ? ES seems to recognize that it is an array, so the request should not be the problem. As for the document, using the transport client it can create the "phones" field (as an array) when it is not present. I wonder why it does not do the same with the low-level REST client.
Looking forward to having a discussion, I wish you a pleasant day.
Regards.