Skip to content

Commit 8a6bcc5

Browse files
Auto-generated API code (#2988)
1 parent 2bfa687 commit 8a6bcc5

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docs/reference/api-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ client.deleteByQuery({ index })
474474
- **`max_docs` (Optional, number)**: The maximum number of documents to delete.
475475
- **`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_grid, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })**: The documents to delete specified with Query DSL.
476476
- **`slice` (Optional, { field, id, max })**: Slice the request manually using the provided slice ID and total number of slices.
477+
- **`sort` (Optional, string \| { _score, _doc, _geo_distance, _script } \| string \| { _score, _doc, _geo_distance, _script }[])**: A sort object that specifies the order of deleted documents.
477478
- **`allow_no_indices` (Optional, boolean)**: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
478479
- **`analyzer` (Optional, string)**: Analyzer to use for the query string. This parameter can be used only when the `q` query string parameter is specified.
479480
- **`analyze_wildcard` (Optional, boolean)**: If `true`, wildcard and prefix queries are analyzed. This parameter can be used only when the `q` query string parameter is specified.
@@ -495,7 +496,6 @@ client.deleteByQuery({ index })
495496
- **`search_timeout` (Optional, string \| -1 \| 0)**: The explicit timeout for each search request. It defaults to no timeout.
496497
- **`search_type` (Optional, Enum("query_then_fetch" \| "dfs_query_then_fetch"))**: The type of the search operation. Available options include `query_then_fetch` and `dfs_query_then_fetch`.
497498
- **`slices` (Optional, number \| Enum("auto"))**: The number of slices this task should be divided into.
498-
- **`sort` (Optional, string[])**: A list of `<field>:<direction>` pairs.
499499
- **`stats` (Optional, string[])**: The specific `tag` of the request for logging and statistical purposes.
500500
- **`terminate_after` (Optional, number)**: The maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting. Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
501501
- **`timeout` (Optional, string \| -1 \| 0)**: The period each deletion request waits for active shards.

src/api/api/delete_by_query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const acceptedParams: Record<string, { path: string[], body: string[], query: st
3636
body: [
3737
'max_docs',
3838
'query',
39-
'slice'
39+
'slice',
40+
'sort'
4041
],
4142
query: [
4243
'allow_no_indices',

src/api/types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,6 @@ export interface DeleteByQueryRequest extends RequestBase {
434434
search_type?: SearchType
435435
/** The number of slices this task should be divided into. */
436436
slices?: Slices
437-
/** A comma-separated list of `<field>:<direction>` pairs. */
438-
sort?: string[]
439437
/** The specific `tag` of the request for logging and statistical purposes. */
440438
stats?: string[]
441439
/** The maximum number of documents to collect for each shard.
@@ -464,10 +462,12 @@ export interface DeleteByQueryRequest extends RequestBase {
464462
query?: QueryDslQueryContainer
465463
/** Slice the request manually using the provided slice ID and total number of slices. */
466464
slice?: SlicedScroll
465+
/** A sort object that specifies the order of deleted documents. */
466+
sort?: Sort
467467
/** All values in `body` will be added to the request body. */
468-
body?: string | { [key: string]: any } & { index?: never, allow_no_indices?: never, analyzer?: never, analyze_wildcard?: never, conflicts?: never, default_operator?: never, df?: never, expand_wildcards?: never, from?: never, ignore_unavailable?: never, lenient?: never, preference?: never, refresh?: never, request_cache?: never, requests_per_second?: never, routing?: never, q?: never, scroll?: never, scroll_size?: never, search_timeout?: never, search_type?: never, slices?: never, sort?: never, stats?: never, terminate_after?: never, timeout?: never, version?: never, wait_for_active_shards?: never, wait_for_completion?: never, max_docs?: never, query?: never, slice?: never }
468+
body?: string | { [key: string]: any } & { index?: never, allow_no_indices?: never, analyzer?: never, analyze_wildcard?: never, conflicts?: never, default_operator?: never, df?: never, expand_wildcards?: never, from?: never, ignore_unavailable?: never, lenient?: never, preference?: never, refresh?: never, request_cache?: never, requests_per_second?: never, routing?: never, q?: never, scroll?: never, scroll_size?: never, search_timeout?: never, search_type?: never, slices?: never, stats?: never, terminate_after?: never, timeout?: never, version?: never, wait_for_active_shards?: never, wait_for_completion?: never, max_docs?: never, query?: never, slice?: never, sort?: never }
469469
/** All values in `querystring` will be added to the request querystring. */
470-
querystring?: { [key: string]: any } & { index?: never, allow_no_indices?: never, analyzer?: never, analyze_wildcard?: never, conflicts?: never, default_operator?: never, df?: never, expand_wildcards?: never, from?: never, ignore_unavailable?: never, lenient?: never, preference?: never, refresh?: never, request_cache?: never, requests_per_second?: never, routing?: never, q?: never, scroll?: never, scroll_size?: never, search_timeout?: never, search_type?: never, slices?: never, sort?: never, stats?: never, terminate_after?: never, timeout?: never, version?: never, wait_for_active_shards?: never, wait_for_completion?: never, max_docs?: never, query?: never, slice?: never }
470+
querystring?: { [key: string]: any } & { index?: never, allow_no_indices?: never, analyzer?: never, analyze_wildcard?: never, conflicts?: never, default_operator?: never, df?: never, expand_wildcards?: never, from?: never, ignore_unavailable?: never, lenient?: never, preference?: never, refresh?: never, request_cache?: never, requests_per_second?: never, routing?: never, q?: never, scroll?: never, scroll_size?: never, search_timeout?: never, search_type?: never, slices?: never, stats?: never, terminate_after?: never, timeout?: never, version?: never, wait_for_active_shards?: never, wait_for_completion?: never, max_docs?: never, query?: never, slice?: never, sort?: never }
471471
}
472472

473473
export interface DeleteByQueryResponse {

0 commit comments

Comments
 (0)