From 015411feafdad63736073d3f98e02a1a255db0c8 Mon Sep 17 00:00:00 2001 From: Erik de Vries Date: Wed, 24 Oct 2018 12:15:06 +0200 Subject: [PATCH] Added refresh=wait_for to bulk update url. This should make update scripts less demanding on the server side, because the server only replies after refreshing (happens every second) --- R/elastic_update.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/elastic_update.R b/R/elastic_update.R index 8bf7c37..e9d25eb 100644 --- a/R/elastic_update.R +++ b/R/elastic_update.R @@ -13,7 +13,7 @@ ################################################################################################# elastic_update <- function(x, es_super = 'secret') { bulk <- paste0(x,'\n') - url <- paste0('https://super:',es_super,'@linux01.uis.no/es/_bulk?pretty') + url <- paste0('https://super:',es_super,'@linux01.uis.no/es/_bulk?pretty&refresh=wait_for') res <- RETRY("POST", url = url , body = bulk , encode = "raw"