Skip to content

Commit

Permalink
[Gem] ESQL version parameter is not a thing anymore
Browse files Browse the repository at this point in the history
Reverts changes from 731f582
  • Loading branch information
picandocodigo committed May 23, 2024
1 parent c255ddc commit d6021e5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions elasticsearch/lib/elasticsearch/helpers/esql_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ module ESQLHelper
# @see https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html#_esql_helper
#
def self.query(client, query, params = {}, parser: {})
request = build_request(query, params)
response = client.esql.query(request)
response = client.esql.query({ body: { query: query }, format: 'json' }.merge(params))

columns = response['columns']
response['values'].map do |value|
Expand All @@ -72,15 +71,6 @@ def self.query(client, query, params = {}, parser: {})
end.reduce({}, :merge)
end
end

def self.build_request(query, params)
{
body: {
query: query,
version: params.delete(:version) || '2024.04.01' },
format: 'json'
}.merge(params)
end
end
end
end

0 comments on commit d6021e5

Please sign in to comment.