module Elasticsearch::API::SearchApplication::Actions
Public Instance Methods
Deletes a search application. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :name The name of the search application @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-search-application.html
# File lib/elasticsearch/api/actions/search_application/delete.rb, line 36 def delete(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.delete' } defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE path = "_application/search_application/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Delete a behavioral analytics collection. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :name The name of the analytics collection to be deleted @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-analytics-collection.html
# File lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb, line 36 def delete_behavioral_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.delete_behavioral_analytics' } defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE path = "_application/analytics/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Returns the details about a search application. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :name The name of the search application @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/get-search-application.html
# File lib/elasticsearch/api/actions/search_application/get.rb, line 36 def get(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.get' } defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = "_application/search_application/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Returns the existing behavioral analytics collections. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [List] :name A comma-separated list of analytics collections to limit the returned information @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/list-analytics-collection.html
# File lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb, line 36 def get_behavioral_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.get_behavioral_analytics' } defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = if _name "_application/analytics/#{Utils.__listify(_name)}" else '_application/analytics' end params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Returns the existing search applications. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :q Query in the Lucene query string syntax @option arguments [Integer] :from Starting offset (default: 0) @option arguments [Integer] :size specifies a max number of results to get @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/list-search-applications.html
# File lib/elasticsearch/api/actions/search_application/list.rb, line 38 def list(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.list' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_application/search_application' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Creates a behavioral analytics event for existing collection. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :collection_name The name of behavioral analytics collection @option arguments [String] :event_type Behavioral analytics event type. Available: page_view, search, search_click @option arguments [Boolean] :debug If true, returns event information that will be stored @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The event definition (Required)
@see todo.com/tbd
# File lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb, line 39 def post_behavioral_analytics_event(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.post_behavioral_analytics_event' } defined_params = %i[collection_name event_type].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'collection_name' missing" unless arguments[:collection_name] raise ArgumentError, "Required argument 'event_type' missing" unless arguments[:event_type] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _collection_name = arguments.delete(:collection_name) _event_type = arguments.delete(:event_type) method = Elasticsearch::API::HTTP_POST path = "_application/analytics/#{Utils.__listify(_collection_name)}/event/#{Utils.__listify(_event_type)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Creates or updates a search application. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :name The name of the search application to be created or updated @option arguments [Boolean] :create If true, requires that a search application with the specified resource_id does not already exist. (default: false) @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The search application configuration, including ‘indices` (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/put-search-application.html
# File lib/elasticsearch/api/actions/search_application/put.rb, line 38 def put(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.put' } defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_application/search_application/#{Utils.__listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Creates a behavioral analytics collection. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :name The name of the analytics collection to be created or updated @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/put-analytics-collection.html
# File lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb, line 36 def put_behavioral_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.put_behavioral_analytics' } defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_application/analytics/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Renders a query for given search application search parameters This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :name The name of the search application to render the query for @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Search parameters, which will override any default search parameters defined in the search application template
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/search-application-render-query.html
# File lib/elasticsearch/api/actions/search_application/render_query.rb, line 37 def render_query(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.render_query' } defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST path = "_application/search_application/#{Utils.__listify(_name)}/_render_query" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Perform a search against a search application This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [String] :name The name of the search application to be searched @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Search parameters, including template parameters that override defaults
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/search-application-search.html
# File lib/elasticsearch/api/actions/search_application/search.rb, line 38 def search(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'search_application.search' } defined_params = [:name].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _name = arguments.delete(:name) method = if body Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = "_application/search_application/#{Utils.__listify(_name)}/_search" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end