The response isn't one that I would expect from Elasticsearch. For example, If I run your code against Elasticsearch 7.5.2 instance that doesn't contain a tweets index, the response is
Object({"error": Object({"index": String("tweets"), "index_uuid": String("_na_"), "reason": String("no such index [tweets]"), "resource.id": String("tweets"), "resource.type": String("index_or_alias"), "root_cause": Array([Object({"
index": String("tweets"), "index_uuid": String("_na_"), "reason": String("no such index [tweets]"), "resource.id": String("tweets"), "resource.type": String("index_or_alias"), "type": String("index_not_found_exception")})]), "type":
String("index_not_found_exception")}), "status": Number(404)})
Note that error is a serde::Value::Object and there's no statusCode or message properties.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.