lib/elasticsearch/api/actions/search_template.rb in elasticsearch-api-8.0.1 vs lib/elasticsearch/api/actions/search_template.rb in elasticsearch-api-8.1.0
- old
+ new
@@ -35,18 +35,19 @@
# @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response
# @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The search definition template and its params (*Required*)
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.1/search-template.html
#
def search_template(arguments = {})
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
- arguments = arguments.clone
headers = arguments.delete(:headers) || {}
- body = arguments.delete(:body)
+ body = arguments.delete(:body)
+
+ arguments = arguments.clone
_index = arguments.delete(:index)
method = Elasticsearch::API::HTTP_POST
path = if _index