ropensci / elastic

R client for the Elasticsearch HTTP API
https://docs.ropensci.org/elastic
Other
245 stars 58 forks source link

Bad URL, colon is first character #231

Closed mbannert closed 5 years ago

mbannert commented 5 years ago

I got the latest elasticsearch, just downloaded the R package from github via devtools. Unfortunately running

library(elastic)
shakespeare <- system.file("examples", "shakespeare_data_.json", package = "elastic")
docs_bulk(shakespeare)

leads to : Error in curl::curl_fetch_memory(url, handle = handle) : Bad URL, colon is first character

I use curl 7.54.0 (x86_64-apple-darwin17.0) on OSX High Sierra.

Session Info ```r R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.4 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] elastic_0.8.4.9410 loaded via a namespace (and not attached): [1] httr_1.3.1 compiler_3.5.1 R6_2.2.2 tools_3.5.1 curl_3.2 [6] yaml_2.1.19 jsonlite_1.5 ```
sckott commented 5 years ago

did you run connect() first?

mbannert commented 5 years ago

@sckott thanks :bowtie: Even though not reading the readme file til the end was obviously my bad, I'd suggest to move up the initialize part. Given that you manually start elasticsearch, it's not that obvious that you have to initialize things from R. In other words: the Shakespeare example is not reproducible in its current form.

sckott commented 5 years ago

good point, fixed now