class_update: added explicit httr::: references

master
Erik de Vries 6 years ago
parent f543d658bd
commit 6bb8f9b635

@ -21,8 +21,8 @@ class_update <- function(out, localhost = T, model_final, dfm_words, varname, es
pred <- data.frame(id = out$`_id`, pred = predict(model_final, newdata = dfm)) pred <- data.frame(id = out$`_id`, pred = predict(model_final, newdata = dfm))
bulk <- apply(pred, 1, bulk_writer, varname = varname, type = 'set') bulk <- apply(pred, 1, bulk_writer, varname = varname, type = 'set')
res <- elastic_update(bulk, es_super = es_super, localhost = localhost) res <- elastic_update(bulk, es_super = es_super, localhost = localhost)
stop_for_status(res) httr:::stop_for_status(res)
appData <- content(res) appData <- httr:::content(res)
if (appData$errors == T){ if (appData$errors == T){
print(appData) print(appData)
stop("Aborting, errors found during updating") stop("Aborting, errors found during updating")

Loading…
Cancel
Save