Skip to content

Commit 8341ebc

Browse files
jrodewigdebadair
andauthored
[7.x] [DOCS] Reformats the update by query API. (elastic#46199) (elastic#58700)
Co-authored-by: debadair <[email protected]>
1 parent 84513c7 commit 8341ebc

File tree

2 files changed

+299
-268
lines changed

2 files changed

+299
-268
lines changed

docs/reference/docs/delete-by-query.asciidoc

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ POST /twitter/_delete_by_query
1919
--------------------------------------------------
2020
// TEST[setup:big_twitter]
2121

22-
[[docs-delete-by-query-api-request]]
23-
==== {api-request-title}
24-
25-
`POST /<index>/_delete_by_query`
26-
2722
////
2823
2924
[source,console-result]
@@ -49,6 +44,11 @@ POST /twitter/_delete_by_query
4944
// TESTRESPONSE[s/"took" : 147/"took" : "$body.took"/]
5045
////
5146

47+
[[docs-delete-by-query-api-request]]
48+
==== {api-request-title}
49+
50+
`POST /<index>/_delete_by_query`
51+
5252
[[docs-delete-by-query-api-desc]]
5353
==== {api-description-title}
5454

@@ -89,8 +89,7 @@ request to be refreshed. Unlike the delete API, it does not support
8989

9090
If the request contains `wait_for_completion=false`, {es}
9191
performs some preflight checks, launches the request, and returns a
92-
<<docs-delete-by-query-task-api,`task`>>
93-
you can use to cancel or get the status of the task. {es} creates a
92+
<<tasks,`task`>> you can use to cancel or get the status of the task. {es} creates a
9493
record of this task as a document at `.tasks/task/${taskId}`. When you are
9594
done with a task, you should delete the task document so {es} can reclaim the
9695
space.
@@ -227,9 +226,7 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeout]
227226

228227
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=version]
229228

230-
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeout]
231-
232-
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=wait_for_active_shards]
229+
include::{docdir}/rest-api/common-parms.asciidoc[tag=wait_for_active_shards]
233230

234231
[[docs-delete-by-query-api-request-body]]
235232
==== {api-request-body-title}
@@ -239,7 +236,7 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=wait_for_active_shards
239236
using the <<query-dsl,Query DSL>>.
240237

241238

242-
[[docs-delete-by-quer-api-response-body]]
239+
[[docs-delete-by-query-api-response-body]]
243240
==== Response body
244241

245242
//////////////////////////
@@ -330,7 +327,7 @@ The number of requests per second effectively executed during the delete by quer
330327
`throttled_until_millis`::
331328

332329
This field should always be equal to zero in a `_delete_by_query` response. It only
333-
has meaning when using the <<docs-delete-by-query-task-api, Task API>>, where it
330+
has meaning when using the <<tasks, Task API>>, where it
334331
indicates the next time (in milliseconds since epoch) a throttled request will be
335332
executed again in order to conform to `requests_per_second`.
336333

@@ -541,7 +538,7 @@ Adding `slices` to `_delete_by_query` just automates the manual process used in
541538
the section above, creating sub-requests which means it has some quirks:
542539

543540
* You can see these requests in the
544-
<<docs-delete-by-query-task-api,Tasks APIs>>. These sub-requests are "child"
541+
<<tasks,Tasks APIs>>. These sub-requests are "child"
545542
tasks of the task for the request with `slices`.
546543
* Fetching the status of the task for the request with `slices` only contains
547544
the status of completed slices.
@@ -655,7 +652,7 @@ you to delete that document.
655652

656653
[float]
657654
[[docs-delete-by-query-cancel-task-api]]
658-
==== Cancel a delete by query operation
655+
===== Cancel a delete by query operation
659656

660657
Any delete by query can be canceled using the <<tasks,task cancel API>>:
661658

0 commit comments

Comments
 (0)