Skip to content
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: 1 addition & 0 deletions elasticsearch-api/lib/elasticsearch/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def perform_request(method, path, params = {}, body = nil, headers = nil, reques
:snapshot,
:sql,
:ssl,
:streams,
:synonyms,
:tasks,
:text_structure,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module Actions
# A query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`. (*Required*)
# @option arguments [Boolean] :drop_null_columns Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
# If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
# @option arguments [String] :format A short version of the Accept header, for example `json` or `yaml`.
# @option arguments [Time] :keep_alive The period for which the query and its results are stored in the cluster.
# When this period expires, the query and its results are deleted, even if the query is still ongoing.
# @option arguments [Time] :wait_for_completion_timeout The period to wait for the request to finish.
Expand Down
49 changes: 1 addition & 48 deletions elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,54 +30,6 @@ module Actions
# * A `geotile_grid` or `geohex_grid` aggregation on the `<field>`. The `grid_agg` parameter determines the aggregation type. The aggregation uses the `<zoom>/<x>/<y>` tile as a bounding box.
# * Optionally, a `geo_bounds` aggregation on the `<field>`. The search only includes this aggregation if the `exact_bounds` parameter is `true`.
# * If the optional parameter `with_labels` is `true`, the internal search will include a dynamic runtime field that calls the `getLabelPosition` function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label.
# For example, Elasticsearch may translate a vector tile search API request with a `grid_agg` argument of `geotile` and an `exact_bounds` argument of `true` into the following search
#
# ```
# GET my-index/_search
# {
# "size": 10000,
# "query": {
# "geo_bounding_box": {
# "my-geo-field": {
# "top_left": {
# "lat": -40.979898069620134,
# "lon": -45
# },
# "bottom_right": {
# "lat": -66.51326044311186,
# "lon": 0
# }
# }
# }
# },
# "aggregations": {
# "grid": {
# "geotile_grid": {
# "field": "my-geo-field",
# "precision": 11,
# "size": 65536,
# "bounds": {
# "top_left": {
# "lat": -40.979898069620134,
# "lon": -45
# },
# "bottom_right": {
# "lat": -66.51326044311186,
# "lon": 0
# }
# }
# }
# },
# "bounds": {
# "geo_bounds": {
# "field": "my-geo-field",
# "wrap_longitude": false
# }
# }
# }
# }
# ```
#
# The API returns results as a binary Mapbox vector tile.
# Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers:
# * A `hits` layer containing a feature for each `<field>` value matching the `geo_bounding_box` query.
Expand Down Expand Up @@ -142,6 +94,7 @@ module Actions
# Some cells may intersect more than one vector tile.
# To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level.
# Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density.
# Learn how to use the vector tile search API with practical examples in the {https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search Vector tile search examples} guide.
#
# @option arguments [String, Array] :index Comma-separated list of data streams, indices, or aliases to search (*Required*)
# @option arguments [String] :field Field containing geospatial data to return (*Required*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module Actions
# To use this API, you must have at least the `manage_own_api_key` or the `read_security` cluster privileges.
# If you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.
# If you have the `read_security`, `manage_api_key`, or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.
# Refer to the linked documentation for examples of how to find API keys:
#
# @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key.
# An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This code was automatically generated from the Elasticsearch Specification
# See https://github.com/elastic/elasticsearch-specification
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
module Elasticsearch
module API
module Streams
module Actions
# Disable the Logs Streams feature for this cluster
#
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-disable.html
#
def logs_disable(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'streams.logs_disable' }

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

method = Elasticsearch::API::HTTP_POST
path = '_streams/logs/_disable'
params = {}

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This code was automatically generated from the Elasticsearch Specification
# See https://github.com/elastic/elasticsearch-specification
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
module Elasticsearch
module API
module Streams
module Actions
# Enable the Logs Streams feature for this cluster
#
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-enable.html
#
def logs_enable(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'streams.logs_enable' }

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

method = Elasticsearch::API::HTTP_POST
path = '_streams/logs/_enable'
params = {}

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
50 changes: 50 additions & 0 deletions elasticsearch-api/lib/elasticsearch/api/actions/streams/status.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This code was automatically generated from the Elasticsearch Specification
# See https://github.com/elastic/elasticsearch-specification
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
module Elasticsearch
module API
module Streams
module Actions
# Return the current status of the streams feature for each streams type
#
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-status.html
#
def status(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'streams.status' }

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

method = Elasticsearch::API::HTTP_GET
path = '_streams/status'
params = {}

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
4 changes: 2 additions & 2 deletions elasticsearch-api/lib/elasticsearch/api/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

module Elasticsearch
module API
VERSION = '9.0.0'.freeze
ES_SPECIFICATION_COMMIT = '09ebf27a057301e6f26581259d3c1d105074bdfd'.freeze
VERSION = '9.1.0'.freeze
ES_SPECIFICATION_COMMIT = 'cd2d1fba07d3224129ca5a8d6018d86f67004fdf'.freeze
end
end
35 changes: 35 additions & 0 deletions elasticsearch-api/spec/unit/actions/streams/logs_disable_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

require 'spec_helper'

describe 'client.streams#logs_disable' do
let(:expected_args) do
[
'POST',
'_streams/logs/_disable',
{},
nil,
{},
{ endpoint: 'streams.logs_disable' }
]
end

it 'performs the request' do
expect(client_double.streams.logs_disable).to be_a Elasticsearch::API::Response
end
end
35 changes: 35 additions & 0 deletions elasticsearch-api/spec/unit/actions/streams/logs_enable_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

require 'spec_helper'

describe 'client.streams#logs_enable' do
let(:expected_args) do
[
'POST',
'_streams/logs/_enable',
{},
nil,
{},
{ endpoint: 'streams.logs_enable' }
]
end

it 'performs the request' do
expect(client_double.streams.logs_enable).to be_a Elasticsearch::API::Response
end
end
35 changes: 35 additions & 0 deletions elasticsearch-api/spec/unit/actions/streams/status_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

require 'spec_helper'

describe 'client.streams#status' do
let(:expected_args) do
[
'GET',
'_streams/status',
{},
nil,
{},
{ endpoint: 'streams.status' }
]
end

it 'performs the request' do
expect(client_double.streams.status).to be_a Elasticsearch::API::Response
end
end
2 changes: 1 addition & 1 deletion elasticsearch-api/spec/unit/perform_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
spec.module_namespace.flatten.first == 'rollup' ||
[
'scroll', 'clear_scroll', 'connector.last_sync', 'knn_search',
'indices.put_data_stream_settings', 'indices.get_data_stream_settings'
'indices.remove_block'
].include?(spec.endpoint_name)

# These are the path parts defined by the user in the method argument
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/elasticsearch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ['--charset=UTF-8']

s.required_ruby_version = '>= 2.6' # For compatibility with JRuby 9.3
s.add_dependency 'elasticsearch-api', '9.0.0'
s.add_dependency 'elasticsearch-api', '9.1.0'
s.add_dependency 'elastic-transport', '~> 8.3'

s.add_development_dependency 'base64'
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/lib/elasticsearch/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
# under the License.

module Elasticsearch
VERSION = '9.0.0'.freeze
VERSION = '9.1.0'.freeze
end