lib/elasticsearch/api/actions/exists.rb in elasticsearch-api-7.8.1 vs lib/elasticsearch/api/actions/exists.rb in elasticsearch-api-7.9.0.pre
- old
+ new
@@ -32,18 +32,19 @@
# @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
# @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
# @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
#
# *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.8/docs-get.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-get.html
#
def exists(arguments = {})
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
@@ -60,11 +61,11 @@
method = Elasticsearch::API::HTTP_HEAD
path = if _index && _type && _id
"#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/#{Utils.__listify(_id)}"
else
"#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}"
- end
+ end
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
body = nil
Utils.__rescue_from_not_found do
@@ -87,7 +88,7 @@
:_source_includes,
:version,
:version_type
].freeze)
end
- end
+ end
end