ropensci / elastic

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

cluster_reroute #291

Open featherduino opened 2 years ago

featherduino commented 2 years ago
Session Info ```r cluster_reroute(conn = z,body=x) ``` Error in cli$post(body = body, query = args, encode = "json") : argument "args" is missing, with no default My body is a json I don't see an args argument in the docs
featherduino commented 2 years ago

Error on using this, cant decode this err please help

cluster_reroute(conn = z,query=toJSON(fromJSON(x)),body = NULL)
Error in es_POST(conn, "_cluster/reroute", query = body, raw = raw, callopts = callopts,  : 
  formal argument "query" matched by multiple actual arguments
featherduino commented 2 years ago

Anyone here ?

sckott commented 2 years ago

i think you need to pass the data to body instead of query -

cluster_reroute(conn = z, body = toJSON(fromJSON(x)))
featherduino commented 2 years ago

yup on doing that I get an error cluster_reroute(conn = z, body = toJSON(fromJSON(x)))

x<-' { "commands" : [ { "allocate_replica" : { "index" : "XXXXX", "shard" : 0, "node" : "XXXXXX" } } ] }'

Error in cli$post(body = body, query = args, encode = "json") : argument "args" is missing, with no default

featherduino commented 2 years ago

??

sckott commented 2 years ago

can you reinstall and try again, install like remotes::install_github("sckott/elastic")

maelle commented 1 year ago

For info this package is looking for a new maintainer cf #292 :smile_cat: