otto-de / flummi

Flummi Elastic Search HTTP REST Client
https://github.com/otto-de/flummi
Apache License 2.0
56 stars 28 forks source link

Invalid reply from Elastic Search: {"acknowledged":true} #8

Closed andreikilin closed 7 years ago

andreikilin commented 7 years ago

Hi

I caught exception when I was trying to send request to elasticsearch:

de.otto.flummi.InvalidElasticsearchResponseException: Invalid reply from Elastic Search: {"acknowledged":true} at de.otto.flummi.request.CreateIndexRequestBuilder.execute(CreateIndexRequestBuilder.java:59)

JsonObject responseObject = gson.fromJson(jsonString, JsonObject.class); This line could not deserialize string "{\"acknowledged\":true}"

But this can JsonElement element = gson.fromJson (jsonString, JsonElement.class); JsonObject responseObject = gson.element.getAsJsonObject();

Could you make a fix and upload jar file to manen? Thanks!

BastianVoigt commented 7 years ago

Hi, which elasticsearch version, and which version of Flummi are you using? Bastian

andreikilin commented 7 years ago

elasticsearch 2.4.3 flummi -0.2.0

BastianVoigt commented 7 years ago

Please upgrade to flummi 0.21.0

andreikilin commented 7 years ago

Sorry

But I found the same problem with flummi-5.0.24 and elasticsearch-5.2.0 Invalid reply from Elastic Search: {"acknowledged":true,"shards_acknowledged":true}