field_stats(fields = NULL, index = NULL, level = "cluster", body = list(), raw = FALSE, asdf = FALSE, ...)
TRUE
, use fromJSON
to parse JSON
directly to a data.frame. If FALSE
(Default), list output is given.POST
The field stats api by defaults executes on all indices, but can execute on specific indices too.
Search_uri
Search
msearch
## Not run:
# connect()
# ff <- c("scientificName", "continent", "decimalLatitude", "play_name", "speech_number")
# field_stats("play_name")
# field_stats("play_name", level = "cluster")
# field_stats(ff, level = "indices")
# field_stats(ff)
# field_stats(ff, index = c("gbif", "shakespeare"))
#
# # can also pass a body, just as with Search()
# # field_stats(body = list(fields = "rating")) # doesn't work
# field_stats(body = '{ "fields": ["scientificName"] }', index = "gbif")
#
# body <- '{
# "fields" : ["scientificName", "decimalLatitude"]
# }'
# field_stats(body = body, level = "indices", index = "gbif")
# ## End(Not run)
Run the code above in your browser using DataLab