lib/elasticsearch/api/actions/index.rb in elasticsearch-api-8.0.1 vs lib/elasticsearch/api/actions/index.rb in elasticsearch-api-8.1.0
- old
+ new
@@ -34,19 +34,20 @@
# @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with
# @option arguments [Boolean] :require_alias When true, requires destination to be an alias. Default is false
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The document (*Required*)
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.1/docs-index_.html
#
def index(arguments = {})
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
- arguments = arguments.clone
headers = arguments.delete(:headers) || {}
body = arguments.delete(:body)
+
+ arguments = arguments.clone
_id = arguments.delete(:id)
_index = arguments.delete(:index)