Error with the elasticsearch.build task
michalmuskala opened this issue · 3 comments
michalmuskala commented
Library version: 0.5.1
While trying to run the elasticsearch.build
task for the first time in the new project against the server from Elastic Cloud.
The error is:
** (Mix) Index resources could not be created.
%Elasticsearch.Exception{col: nil, line: nil,
message: "forcemerge takes arguments in query parameters, not in the request body",
query: nil,
raw: %{
"error" => %{
"reason" => "forcemerge takes arguments in query parameters, not in the request body",
"root_cause" => [%{"reason" => "forcemerge takes arguments in query parameters, not in the request body", "type" => "illegal_argument_exception"}],
"type" => "illegal_argument_exception"
},
"status" => 400
},
status: 400,
type: "illegal_argument_exception"
}
I don't have much experience with ElasticSearch, but it seems to me that the culprit is this call:
Where it passes an empty JSON document as argument instead of passing no body at all, but I'm not 100% sure.
danielberkompas commented
Thanks for the bug report! Which version of Elasticsearch are you using?
danielberkompas commented
@michalmuskala I reproduced this on Elasticsearch 6.4.0, and pushed a new version to fix it: 0.5.2
. Can you let me know if it works for you?
michalmuskala commented
Yes, it was 6.4 indeed and it does work now. Thank you.