diff --git a/src/elasticsearch/endpoints/Update.lua b/src/elasticsearch/endpoints/Update.lua index 0a969c9..115cc47 100644 --- a/src/elasticsearch/endpoints/Update.lua +++ b/src/elasticsearch/endpoints/Update.lua @@ -51,10 +51,17 @@ function Update:getUri() if self.index == nil then return nil, "index not specified for Update" end - if self.type == nil then + + -- fix es since 7+ don't support type. + -- removes if + + --[[if self.type == nil then return nil, "type not specified for Update" - end - return "/" .. self.index .. "/" .. self.type .. "/" .. self.id .. "/_update" + end]] + + -- update uri + -- es : https://www.elastic.co/guide/en/elasticsearch/reference/7.0/docs-update.html#docs-update + return "/" .. self.index .. "/_update/" .. self.id end -------------------------------------------------------------------------------