Skip to content

Update source field descriptions in update by query API #10278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions _api-reference/document-apis/update-by-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@
search_timeout | Time | How long to wait until OpenSearch deems the request timed out. Default is no timeout.
slices | String or integer | The number slices to split an operation into for faster processing, specified by integer. When set to `auto` OpenSearch it should decides how many the number of slices for the operation. Default is `1`, which indicates an operation will not be split.
sort | List | A comma-separated list of <field> : <direction> pairs to sort by.
_source | String | Whether to include the `_source` field in the response.
_source_excludes | String | A comma-separated list of source fields to exclude from the response.
_source_includes | String | A comma-separated list of source fields to include in the response.
_source | String | Controls the parts of the document source available to the script and returned in the response. Excluded fields may be removed from the document if not reassigned in the script.

Check failure on line 59 in _api-reference/document-apis/update-by-query.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _api-reference/document-apis/update-by-query.md#L59

[OpenSearch.Spelling] Error: _source. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.
Raw output
{"message": "[OpenSearch.Spelling] Error: _source. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_api-reference/document-apis/update-by-query.md", "range": {"start": {"line": 59, "column": 2}}}, "severity": "ERROR"}
_source_excludes | String | A comma-separated list of source fields to exclude from the script context and the response. Excluded fields may be removed from the document unless explicitly preserved by the script.
_source_includes | String | A comma-separated list of source fields to include in the script context and the response. Only these fields will be available for script processing.
stats | String | Value to associate with the request for additional logging.
terminate_after | Integer | The maximum number of matching documents (hits) OpenSearch should process before terminating the request.
timeout | Time | How long the operation should wait from a response from active shards. Default is `1m`.
version | Boolean | Whether to include the document version as a match.
wait_for_active_shards | String | The number of shards that must be active before OpenSearch executes the operation. Valid values are `all` or any integer up to the total number of shards in the index. Default is 1, which is the primary shard.
wait_for_completion | boolean | When set to `false`, the response body includes a task ID and OpenSearch executes the operation asynchronously. The task ID can be used to check the status of the task or to cancel the task. Default is set to `true`.
wait_for_completion | Boolean | When set to `false`, the response body includes a task ID and OpenSearch executes the operation asynchronously. The task ID can be used to check the status of the task or to cancel the task. Default is set to `true`.

When using `_source`, `_source_includes`, or `_source_excludes` in an `update_by_query` request, these settings affect not only the response but also the fields available to the update script. If a field is excluded from `_source` and not explicitly handled in the script, it may be removed from the document during the update operation. To preserve excluded fields, ensure that the script reads and reassigns them as needed.
{: .important}

## Request body options

Expand Down