Files
elasticsearch-js/docs/reference-update_by_query.asciidoc
2024-12-05 14:46:51 -06:00

122 lines
5.3 KiB
Plaintext

[[reference-update_by_query]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| 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.updateByQuery
Update documents. Updates documents that match the specified query. If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.
{ref}/docs-update-by-query.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(UpdateByQueryRequest, options?): Promise<UpdateByQueryResponse>
----
[discrete]
==== UpdateByQueryRequest
[pass]
++++
<pre>
++++
interface UpdateByQueryRequest extends <<RequestBase>> {
index: <<Indices>>
allow_no_indices?: boolean
analyzer?: string
analyze_wildcard?: boolean
default_operator?: QueryDslOperator
df?: string
expand_wildcards?: <<ExpandWildcards>>
from?: number
ignore_unavailable?: boolean
lenient?: boolean
pipeline?: string
preference?: string
q?: string
refresh?: boolean
request_cache?: boolean
requests_per_second?: number
routing?: <<Routing>>
scroll?: <<Duration>>
scroll_size?: number
search_timeout?: <<Duration>>
search_type?: <<SearchType>>
slices?: <<Slices>>
sort?: string[]
stats?: string[]
terminate_after?: number
timeout?: <<Duration>>
version?: boolean
version_type?: boolean
wait_for_active_shards?: <<WaitForActiveShards>>
wait_for_completion?: boolean
max_docs?: number
query?: QueryDslQueryContainer
script?: <<Script>> | string
slice?: <<SlicedScroll>>
conflicts?: <<Conflicts>>
}
[pass]
++++
</pre>
++++
[discrete]
==== UpdateByQueryResponse
[pass]
++++
<pre>
++++
interface UpdateByQueryResponse {
batches?: number
failures?: <<BulkIndexByScrollFailure>>[]
noops?: number
deleted?: number
requests_per_second?: number
retries?: <<Retries>>
task?: <<TaskId>>
timed_out?: boolean
took?: <<DurationValue>><<<UnitMillis>>>
total?: number
updated?: number
version_conflicts?: number
throttled?: <<Duration>>
throttled_millis?: <<DurationValue>><<<UnitMillis>>>
throttled_until?: <<Duration>>
throttled_until_millis?: <<DurationValue>><<<UnitMillis>>>
}
[pass]
++++
</pre>
++++