Closed emillykkejensen closed 6 years ago
When trying to create an index with settings from a list, it gives an error.
Exampel:
body <- list( settings = list( analysis = list( analyzer = list( my_analyzer = list( type = "standard" ) ) ) ) ) index_create(index = "test", body = body)
Will give the error:
Error in curl::handle_setform(handle, .list = req$fields) : Unsupported value type for form field 'settings'.
Where as: index_create(index = "test", body = jsonlite::toJSON(body, auto_unbox = TRUE)) Works fine.
index_create(index = "test", body = jsonlite::toJSON(body, auto_unbox = TRUE))
Seems to me, that this line might need to be updated with the es_PUT function? https://github.com/ropensci/elastic/blob/d8b6e9eb084baa89e3df92c630fb4d2450ae878d/R/index.R#L292-L293
thanks @emillykkejensen should be fixed now
When trying to create an index with settings from a list, it gives an error.
Exampel:
Will give the error:
Where as:
index_create(index = "test", body = jsonlite::toJSON(body, auto_unbox = TRUE))
Works fine.Seems to me, that this line might need to be updated with the es_PUT function? https://github.com/ropensci/elastic/blob/d8b6e9eb084baa89e3df92c630fb4d2450ae878d/R/index.R#L292-L293