Skip to content

Updates API #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/elasticsearch-serverless/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def perform_request(method, path, params = {}, body = nil, headers = nil, reques
:connector,
:enrich,
:eql,
:esql,
:graph,
:indices,
:inference,
Expand Down
57 changes: 0 additions & 57 deletions lib/elasticsearch-serverless/api/esql/query.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module Actions
# Supports comma-separated values, such as +open,hidden+. Server default: open.
# @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
# @option arguments [Boolean] :verbose Whether the maximum timestamp for each data stream should be calculated and returned.
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
Expand Down
16 changes: 7 additions & 9 deletions lib/elasticsearch-serverless/api/msearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,14 @@ def msearch(arguments = {})

case
when body.is_a?(Array) && body.any? { |d| d.has_key? :search }
payload = body
.inject([]) do |sum, item|
meta = item
data = meta.delete(:search)
payload = body.inject([]) do |sum, item|
meta = item
data = meta.delete(:search)

sum << meta
sum << data
sum
end
.map { |item| ElasticsearchServerless::API.serializer.dump(item) }
sum << meta
sum << data
sum
end.map { |item| ElasticsearchServerless::API.serializer.dump(item) }
payload << "" unless payload.empty?
payload = payload.join("\n")
when body.is_a?(Array)
Expand Down
Loading