# NOT RUN {
elastic_rescource <- elastic("http://localhost:9200", "iris", "data")
query_json <- '{"query": {"match_all": {}}}'
results <- from_size_search(elastic_rescource, query_json)
head(results)
# sepal_length sepal_width petal_length petal_width species
# 1 4.8 3.0 1.4 0.1 setosa
# 2 4.3 3.0 1.1 0.1 setosa
# 3 5.8 4.0 1.2 0.2 setosa
# 4 5.1 3.5 1.4 0.3 setosa
# 5 5.2 3.5 1.5 0.2 setosa
# 6 5.2 3.4 1.4 0.2 setosa
# }
Run the code above in your browser using DataLab