Module: Elasticsearch::XPack::API::Actions
- Defined in:
- lib/elasticsearch/xpack/api/actions/info.rb,
lib/elasticsearch/xpack/api/actions/usage.rb,
lib/elasticsearch/xpack/api/actions/terms_enum.rb,
lib/elasticsearch/xpack/api/actions/params_registry.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#info(arguments = {}) ⇒ Object
Retrieves information about the installed X-Pack features.
-
#terms_enum(arguments = {}) ⇒ Object
The terms enum API can be used to discover terms in the index that begin with the provided string.
-
#usage(arguments = {}) ⇒ Object
Retrieves usage information about the installed X-Pack features.
Instance Method Details
#info(arguments = {}) ⇒ Object
Retrieves information about the installed X-Pack features.
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/elasticsearch/xpack/api/actions/info.rb', line 30 def info(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_GET path = "_xpack" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#terms_enum(arguments = {}) ⇒ Object
The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/elasticsearch/xpack/api/actions/terms_enum.rb', line 30 def terms_enum(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] headers = arguments.delete(:headers) || {} arguments = arguments.clone _index = arguments.delete(:index) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = "#{Elasticsearch::API::Utils.__listify(_index)}/_terms_enum" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end |
#usage(arguments = {}) ⇒ Object
Retrieves usage information about the installed X-Pack features.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/elasticsearch/xpack/api/actions/usage.rb', line 29 def usage(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_GET path = "_xpack/usage" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |