Learn R Programming

elasticsearchr (version 0.3.1)

query: Define Elasticsearch query.

Description

Define Elasticsearch query.

Usage

query(json, size = 0)

Arguments

json

JSON object describing the query that needs to be executed.

size

[optional] The number of documents to return. If left unspecified, then the default if to return all documents.

Value

An elastic_query object.

See Also

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html

Examples

Run this code
# NOT RUN {
all_docs <- query('{"match_all": {}}')
# }

Run the code above in your browser using DataLab