Give better progress info when verbose
Change-Id: Ifd966646bae7fbe09d222794623e12177e375fea
diff --git a/R/KorAPQuery.R b/R/KorAPQuery.R
index b70718c..8081f01 100644
--- a/R/KorAPQuery.R
+++ b/R/KorAPQuery.R
@@ -146,9 +146,12 @@
'&fields=', paste(defaultFields, collapse = ","),
ifelse(metadataOnly, '&access-rewrite-disabled=true', ''))
if (verbose) {
- cat(paste0(webUIRequestUrl, "\n"))
+ cat("Searching \"", query, "\" in \"", vc, "\"", sep="")
}
res = fromJSON(paste0(requestUrl, '&count=1'))
+ if (verbose) {
+ cat(" took ", res$meta$benchmark, "\n", sep="")
+ }
KorAPQuery(
nextStartIndex = 0,
fields = fields[!fields %in% contentFields],