Learn R Programming

elastic (version 0.4.0)

connect: Set connection details to an Elasticsearch engine.

Description

Set connection details to an Elasticsearch engine.

Usage

connect(es_base = "http://127.0.0.1", es_port = 9200, es_user = NULL,
  es_pwd = NULL, force = FALSE, ...)

connection()

Arguments

es_base
The base url, defaults to localhost (http://127.0.0.1)
es_port
port to connect to, defaults to 9200 (optional)
es_user
User name, if required for the connection. You can specify, but ignored for now.
es_pwd
Password, if required for the connection. You can specify, but ignored for now.
force
Force re-load of connection details
...
Further args passed on to print for the es_conn class.

Details

The default configuration is set up for localhost access on port 9200, with no username or password.

connection does not ping the Elasticsearch server, but only prints connection details.

On package load, connect is run to set the default base url and port.

Examples

Run this code
# the default is set to localhost and port 9200
connect()

# or set to a different base url
connect('http://162.243.152.56')

# See connection details
connection()

Run the code above in your browser using DataLab