range: range dsl

View source: R/range.R

rangeR Documentation

range dsl

Description

range dsl

Usage

range(
  .obj = list(),
  ...,
  boost = 1,
  time_zone = NULL,
  execution = NULL,
  cache = FALSE
)

range_(.obj = list(), ..., .dots)

Arguments

.obj

An index object. If nothing passed defaults to all indices, equivalent to doing e.g., localhost:9200/_search

...

Further args passed on

boost

Explanation...

time_zone

Explanation...

execution

Explanation...

cache

Explanation...

.dots

Explanation...

Examples

## Not run: 
elastic::connect(errors = "complete")

x <- index("shakespeare") %>% range( speech_number <= 5 ) %>% size(200)
max(vapply(x$hits$hits, "[[", 1, c("_source", "speech_number")))
x <- index("shakespeare") %>% range( speech_number >= 5 ) %>% size(200)
min(vapply(x$hits$hits, "[[", 1, c("_source", "speech_number")))
# index("shakespeare") %>% range( speech_number <= c(1,5) ) # doens't work
# index("shakespeare") %>% range( speech_number >= c(1,5) ) # doens't work

## End(Not run)

ropensci/elasticdsl documentation built on May 18, 2022, 9:53 a.m.