Skip to content

Commit

Permalink
The issue that type is not supported for updates above Elasticsearch …
Browse files Browse the repository at this point in the history
…7 is fixed. (#13)

Co-authored-by: Arjen10 <[email protected]>
  • Loading branch information
Arjen10 and Arjen10 authored Oct 17, 2024
1 parent 26066ca commit ffab50e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/elasticsearch/endpoints/Update.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

-------------------------------------------------------------------------------
Expand Down

0 comments on commit ffab50e

Please sign in to comment.