Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ client.deleteByQuery({ index })
** *`max_docs` (Optional, number)*: The maximum number of documents to delete.
** *`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.
** *`slice` (Optional, { field, id, max })*: Slice the request manually using the provided slice ID and total number of slices.
** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: A sort object that specifies the order of deleted documents.
** *`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`.
** *`analyzer` (Optional, string)*: Analyzer to use for the query string. This parameter can be used only when the `q` query string parameter is specified.
** *`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.
Expand All @@ -515,7 +516,6 @@ client.deleteByQuery({ index })
** *`search_timeout` (Optional, string | -1 | 0)*: The explicit timeout for each search request. It defaults to no timeout.
** *`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`.
** *`slices` (Optional, number | Enum("auto"))*: The number of slices this task should be divided into.
** *`sort` (Optional, string[])*: A list of `<field>:<direction>` pairs.
** *`stats` (Optional, string[])*: The specific `tag` of the request for logging and statistical purposes.
** *`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.
** *`timeout` (Optional, string | -1 | 0)*: The period each deletion request waits for active shards.
Expand Down
2 changes: 1 addition & 1 deletion src/api/api/delete_by_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default async function DeleteByQueryApi (this: That, params: T.DeleteByQu
export default async function DeleteByQueryApi (this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptions): Promise<T.DeleteByQueryResponse>
export default async function DeleteByQueryApi (this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['index']
const acceptedBody: string[] = ['max_docs', 'query', 'slice']
const acceptedBody: string[] = ['max_docs', 'query', 'slice', 'sort']
const querystring: Record<string, any> = {}
// @ts-expect-error
const userBody: any = params?.body
Expand Down
2 changes: 1 addition & 1 deletion src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ export interface DeleteByQueryRequest extends RequestBase {
search_timeout?: Duration
search_type?: SearchType
slices?: Slices
sort?: string[]
stats?: string[]
terminate_after?: long
timeout?: Duration
Expand All @@ -226,6 +225,7 @@ export interface DeleteByQueryRequest extends RequestBase {
max_docs?: long
query?: QueryDslQueryContainer
slice?: SlicedScroll
sort?: Sort
}

export interface DeleteByQueryResponse {
Expand Down
2 changes: 1 addition & 1 deletion src/api/typesWithBodyKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ export interface DeleteByQueryRequest extends RequestBase {
search_timeout?: Duration
search_type?: SearchType
slices?: Slices
sort?: string[]
stats?: string[]
terminate_after?: long
timeout?: Duration
Expand All @@ -240,6 +239,7 @@ export interface DeleteByQueryRequest extends RequestBase {
max_docs?: long
query?: QueryDslQueryContainer
slice?: SlicedScroll
sort?: Sort
}
}

Expand Down
Loading