lib/elasticsearch/api/actions/mtermvectors.rb in elasticsearch-api-7.6.0 vs lib/elasticsearch/api/actions/mtermvectors.rb in elasticsearch-api-7.7.0.pre

- old
+ new

@@ -21,20 +21,23 @@ # @option arguments [Boolean] :realtime Specifies if requests are real-time as opposed to near-real-time (default: true). # @option arguments [Number] :version Explicit version number for concurrency control # @option arguments [String] :version_type Specific version type # (options: internal,external,external_gte,force) + # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. # # *Deprecation notice*: # Specifying types in urls has been deprecated # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docs-multi-termvectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html # def mtermvectors(arguments = {}) + headers = arguments.delete(:headers) || {} + arguments = arguments.clone ids = arguments.delete(:ids) _index = arguments.delete(:index) @@ -45,18 +48,18 @@ "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_mtermvectors" elsif _index "#{Utils.__listify(_index)}/_mtermvectors" else "_mtermvectors" -end + end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) if ids body = { :ids => ids } else body = arguments[:body] end - perform_request(method, path, params, body).body + perform_request(method, path, params, body, headers).body end # Register this action with its valid params when the module is loaded. # # @since 6.2.0