4 elasticsearch & {elastic}
/ {uptasticsearch}
docker pull elasticsearch:7.1.0
docker run -d --name elasticsearch --net r-db -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" elasticsearch:7.1.0
In RStudio
library(elastic)
x <- connect(port = 9200, host = "elasticsearch")
if (index_exists(x, "plos")) index_delete(x, "plos")
plosdat <- system.file("examples", "plos_data.json", package = "elastic")
invisible(docs_bulk(x, plosdat))
Search(x, index = "plos", size = 1)$hits$hits
Tests needed fo {uptasticsearch}