81 lines
4.2 KiB
Plaintext
81 lines
4.2 KiB
Plaintext
[[reference-create]]
|
|
|
|
////////
|
|
===========================================================================================================================
|
|
|| ||
|
|
|| ||
|
|
|| ||
|
|
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|
|
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|
|
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|
|
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|
|
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|
|
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|
|
|| ||
|
|
|| ||
|
|
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|
|
|| You should update the script that does the generation, which can be found in: ||
|
|
|| https://github.com/elastic/elastic-client-generator-js ||
|
|
|| ||
|
|
|| You can run the script with the following command: ||
|
|
|| npm run elasticsearch -- --version <version> ||
|
|
|| ||
|
|
|| ||
|
|
|| ||
|
|
===========================================================================================================================
|
|
////////
|
|
|
|
[discrete]
|
|
[[client.create]]
|
|
=== client.create
|
|
|
|
Index a document. Adds a JSON document to the specified data stream or index and makes it searchable. If the target is an index and the document already exists, the request updates the document and increments its version.
|
|
|
|
{ref}/docs-index_.html[{es} documentation]
|
|
|
|
[discrete]
|
|
==== Function signature
|
|
|
|
[source,ts]
|
|
----
|
|
(CreateRequest, options?): Promise<CreateResponse>
|
|
----
|
|
|
|
[discrete]
|
|
==== CreateRequest
|
|
|
|
[pass]
|
|
++++
|
|
<pre>
|
|
++++
|
|
interface CreateRequest<TDocument = unknown> extends <<RequestBase>> {
|
|
id: <<Id>>
|
|
index: <<IndexName>>
|
|
pipeline?: string
|
|
refresh?: <<Refresh>>
|
|
routing?: <<Routing>>
|
|
timeout?: <<Duration>>
|
|
version?: <<VersionNumber>>
|
|
version_type?: <<VersionType>>
|
|
wait_for_active_shards?: <<WaitForActiveShards>>
|
|
document?: TDocument
|
|
}
|
|
|
|
[pass]
|
|
++++
|
|
</pre>
|
|
++++
|
|
[discrete]
|
|
==== CreateResponse
|
|
|
|
[pass]
|
|
++++
|
|
<pre>
|
|
++++
|
|
type CreateResponse = <<WriteResponseBase>>
|
|
|
|
[pass]
|
|
++++
|
|
</pre>
|
|
++++
|