# NOT RUN {
x <- connect()
msearch1 <- system.file("examples", "msearch_eg1.json", package = "elastic")
readLines(msearch1)
msearch(x, msearch1)
tf <- tempfile(fileext = ".json")
cat('{"index" : "shakespeare"}', file = tf, sep = "\n")
cat('{"query" : {"match_all" : {}}, "from" : 0, "size" : 5}', sep = "\n",
file = tf, append = TRUE)
readLines(tf)
msearch(x, tf)
# }
Run the code above in your browser using DataLab