Sha256: e178ca9f58c37fda1743fe62d1fa5e2b92d0b2da703f346ba40b5f448e085950
Contents?: true
Size: 992 Bytes
Versions: 52
Compression:
Stored size: 992 Bytes
Contents
module Elasticsearch module API module Actions # Create a document. # # Enforce the _create_ operation when indexing a document -- # the operation will return an error when the document already exists. # # @example Create a document # # client.create index: 'myindex', # type: 'mytype', # id: '1', # body: { # title: 'Test 1', # tags: ['y', 'z'], # published: true, # published_at: Time.now.utc.iso8601, # counter: 1 # } # # @option (see Actions#index) # # (The `:op_type` argument is ignored.) # # @see http://elasticsearch.org/guide/reference/api/index_/ # def create(arguments={}) index arguments.update :op_type => 'create' end end end end
Version data entries
52 entries across 52 versions & 2 rubygems