younifyd
Menu

Update

Update

POST/{index}/_update/{id}

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the Update action (under core).
  3. Fill in the fields below, then reference the result from later steps as {{update.response.data}}.

Request

Path parameters

idstringrequired

Document ID

indexstringrequired

The name of the index

Query parameters

_sourceoneOf

Set to `false` to disable source retrieval. You can also specify a comma-separated list of the fields you want to retrieve.

_source_excludesoneOf

Specify the source fields you want to exclude.

_source_includesoneOf

Specify the source fields you want to retrieve.

if_primary_terminteger (int64)

Only perform the operation if the document has this primary term.

if_seq_nointeger (int64)

Only perform the operation if the document has this sequence number.

langstring

The script language.

Default "painless"

refreshoneOf

If 'true', OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes.

require_aliasboolean

If `true`, the destination must be an index alias.

Default false

retry_on_conflictinteger (int32)

Specify how many times should the operation be retried when a conflict occurs.

Default 0

routingoneOf

A custom value used to route operations to a specific shard.

timeoutstring

Period to wait for dynamic mapping updates and active shards. This guarantees OpenSearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur.

wait_for_active_shardsoneOf

The number of shard copies that must be active before proceeding with the operations. Set to 'all' or any positive integer up to the total number of shards in the index (number_of_replicas+1). Defaults to 1 meaning the primary shard.

prettyboolean

Whether to pretty-format the returned JSON response.

Default false

humanboolean

Whether to return human-readable values for statistics.

Default false

error_traceboolean

Whether to include the stack trace of returned errors.

Default false

sourcestring

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_pathoneOf

A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.

Response

Returns 200 with a any. Read it in later steps with {{update.response.data.<field>}}.

Need more? See the OpenSearch guide for connection setup and behaviour shared by every action.

Update — OpenSearch — Documentation