# NOT RUN {
# the default is set to 127.0.0.1 (i.e., localhost) and port 9200
(x <- connect())
x$make_url()
x$ping()
# pass connection object to function calls
Search(x, q = "*:*")
# set username/password (hidden in print method)
connect(user = "me", pwd = "stuff")
# set a different host
# connect(host = '162.243.152.53')
# => http://162.243.152.53:9200
# set a different port
# connect(port = 8000)
# => http://localhost:8000
# set a different context path
# connect(path = 'foo_bar')
# => http://localhost:9200/foo_bar
# set to https
# connect(transport_schema = 'https')
# => https://localhost:9200
# set headers
connect(headers = list(a = 'foobar'))
# set cainfo path (hidden in print method)
connect(cainfo = '/some/path/bundle.crt')
# }
Run the code above in your browser using DataLab