es_connect: Set connection details to Elasticsearch engine

Description Usage Arguments Details Examples

View source: R/conn.R

Description

Set connection details to Elasticsearch engine

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
es_connect(
  host = "127.0.0.1",
  port = 9200,
  primary_index = NULL,
  path = NULL,
  transport_schema = "http",
  user = NULL,
  pwd = NULL,
  headers = NULL,
  cainfo = NULL,
  force = FALSE,
  errors = "simple",
  warn = TRUE,
  ...
)

Arguments

host

(character) The base host, defaults to 127.0.0.1

port

(character) port to connect to, defaults to 9200 (optional)

primary_index

the name of the primary index to use for querying (will be used as a fallback if index is not explicitly specified in the query)

path

(character) context path that is appended to the end of the url. Default: NULL, ignored

transport_schema

(character) http or https. Default: http

user

(character) User name, if required for the connection. You can specify, but ignored for now.

pwd

(character) Password, if required for the connection. You can specify, but ignored for now.

headers

named list of headers. These headers are used in all requests

cainfo

(character) path to a crt bundle, passed to curl option cainfo

force

(logical) Force re-load of connection details. Default: FALSE

errors

(character) One of simple (Default) or complete. Simple gives http code and error message on an error, while complete gives both http code and error message, and stack trace, if available.

warn

(logical) whether to throw warnings from the Elasticsearch server when provided. Pulls warnings from response headers when given. default: TRUE. To turn these off, you can set warn=FALSE or wrap function calls in suppressWarnings(). You can also see warnings in headers by using curl verbose.

...

additional curl options to be passed in ALL http requests

Details

See elastic::connect() for more details.

Examples

1
2
3
4
## Not run: 
con <- es_connect(host = "localhost", port = 9200)

## End(Not run)

hafen/elasticquery documentation built on May 17, 2021, 3:01 p.m.