grapes-search-grapes: Execute query or search.

Description Usage Arguments Value Examples

Description

Execute query or search.

Usage

1
rescource %search% search

Arguments

rescource

An elastic_rescource object that contains the information on the Elasticsearch cluster, index and document type, where the indexed data will reside. If this does not already exist, it will be created automatically.

search

elastic_query or elastic_aggs object.

Value

A data.frame of search or aggregation results.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
results <- elastic("http://localhost:9200", "iris", "data") %search% query('{"match_all": {}}')
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

## End(Not run)

AlexIoannides/elasticsearchr documentation built on July 31, 2019, 9:36 a.m.