Sha256: 39d3726def82423c4c98d4c4f9679edbca80dbccc1aee3764edce714ebdbdcce
Contents?: true
Size: 946 Bytes
Versions: 1
Compression:
Stored size: 946 Bytes
Contents
module Elasticsearch module API module Actions # Retrieve an indexed script from Elasticsearch # # @option arguments [String] :id Template ID (*Required*) # @option arguments [Hash] :body The document # # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html # def get_template(arguments={}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] method = HTTP_GET path = "_search/template/#{arguments[:id]}" params = {} body = arguments[:body] perform_request(method, path, params, body).body rescue Exception => e # NOTE: Use exception name, not full class in Elasticsearch::Client to allow client plugability if Array(arguments[:ignore]).include?(404) && e.class.to_s =~ /NotFound/; false else raise(e) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
elasticsearch-api-1.0.9 | lib/elasticsearch/api/actions/get_template.rb |