Stores a typed JSON document in an index, making it searchable. When the `id` param is not set, a unique id will be auto-generated. When you specify an `id` either a new document will be created, or an existing document will be updated. To enforce "put-if-absent" behavior set the `opType` to `"create"` or use the `create()` method.

Optimistic concurrency control is performed, when the `version` argument is specified. By default, no version checks are performed.

By default, the document will be available for `get()` actions immediately, but will only be available for searching after an index refresh (which can happen automatically or manually). See <<api-indices-refresh>>.
