lib/opensearch/api/actions/exists.rb in opensearch-api-1.0.0 vs lib/opensearch/api/actions/exists.rb in opensearch-api-2.0.0

- old
+ new

@@ -29,11 +29,10 @@ module Actions # Returns information about whether a document exists in an index. # # @option arguments [String] :id The document ID # @option arguments [String] :index The name of the index - # @option arguments [String] :type The type of the document (use `_all` to fetch the first document matching the ID across all types) *Deprecated* # @option arguments [List] :stored_fields A comma-separated list of stored fields to return in the response # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random) # @option arguments [Boolean] :realtime Specify whether to perform the operation in realtime or search mode # @option arguments [Boolean] :refresh Refresh the shard containing the document before performing the operation # @option arguments [String] :routing Specific routing value @@ -60,17 +59,11 @@ _id = arguments.delete(:id) _index = arguments.delete(:index) - _type = arguments.delete(:type) - method = OpenSearch::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 + path = "#{Utils.__listify(_index)}/_doc/#{Utils.__listify(_id)}" params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil Utils.__rescue_from_not_found do