Method: OpenSearch::API::Actions#field_caps
- Defined in:
- lib/opensearch/api/actions/field_caps.rb
#field_caps(arguments = {}) ⇒ Object
Returns the information about the capabilities of fields among multiple indices.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/opensearch/api/actions/field_caps.rb', line 42 def field_caps(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _index = arguments.delete(:index) method = if arguments[:body] OpenSearch::API::HTTP_POST else OpenSearch::API::HTTP_GET end path = if _index "#{Utils.__listify(_index)}/_field_caps" else "_field_caps" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end |