Method: OpenSearch::API::Actions#create
- Defined in:
- lib/opensearch/api/actions/create.rb
#create(arguments = {}) ⇒ Object
Creates a new document in the index.
Returns a 409 response when a document with a same ID already exists in the index.
*Deprecation notice*: Specifying types in urls has been deprecated Deprecated since version 7.0.0
51 52 53 54 55 56 57 |
# File 'lib/opensearch/api/actions/create.rb', line 51 def create(arguments = {}) if arguments[:id] index arguments.update op_type: 'create' else index arguments end end |