WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' @param es_host A string identifying an Elasticsearch host. This should be of the form
549
549
#' \code{[transfer_protocol][hostname]:[port]}. For example, \code{'http://myindex.thing.com:9200'}.
550
550
#' @param es_index The name of an Elasticsearch index to be queried.
551
-
#' @param max_hits Integer. If specified, \code{es_search} will stop pulling data as soon as it has pulled this many hits.
551
+
#' @param max_hits Integer. If specified, \code{es_search} will stop pulling data as soon
552
+
#' as it has pulled this many hits. Default is \code{Inf}, meaning that
553
+
#' all possible hits will be pulled.
552
554
#' @param size Number of records per page of results. See \href{https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html}{Elasticsearch docs} for more.
553
555
#' Note that this will be reset to 0 if you submit a \code{query_body} with
554
556
#' an "aggs" request in it. Also see \code{max_hits}.
@@ -617,7 +619,7 @@ es_search <- function(es_host
617
619
, size=10000
618
620
, query_body='{}'
619
621
, scroll="5m"
620
-
, max_hits=NULL
622
+
, max_hits=Inf
621
623
, n_cores= ceiling(parallel::detectCores()/2)
622
624
, break_on_duplicates=TRUE
623
625
, ignore_scroll_restriction=FALSE
@@ -680,7 +682,9 @@ es_search <- function(es_host
680
682
# time you expect to pass between requests. See the
0 commit comments