Open johnchienbronci opened 2 years ago
File: src/Bulk.cc function: processResult() Find: // process items responses and replace it
// process items responses
const char *itemKeyName = nullptr;
for (const Json::Value &item: items) {
if (!item.isObject()) {
LOG(LogLevel::WARNING, "Bulk items responses have to be objects!");
continue;
}
// check index action response
itemKeyName = nullptr;
if (item.isMember("index") == true) itemKeyName = "index";
else if (item.isMember("create") == true) itemKeyName = "create";
if (itemKeyName != nullptr) {
const Json::Value &res = item[itemKeyName];
if (!res.isObject()) {
LOG(LogLevel::WARNING, "Bulk response has unexpected format, "
"object was expected.");
continue;
}
// read status code
const Json::Value &status = res.get("status", Json::Int(500));
if (!status.isNumeric()) {
LOG(LogLevel::WARNING, "Bulk response was expected to have numeric status. "
"Skipping this response checking.");
continue;
}
// if status code is not 2xx family, consider it as error
if (status.asInt() / 100 != 2) {
errCount++;
}
} else {
LOG(LogLevel::WARNING, "Unsupported 'action' found at bulk response.");
}
}
Hi,
elasticlient lib version: version-02 elastic-search version: 7.17.0
I'm bulk perform fail and without error. Checking log found a msg: Unsupported 'action' found at bulk response.
deatail log: