Skip to content

Commit 1e8760b

Browse files
committed
Added missing path parms
1 parent 69078b0 commit 1e8760b

File tree

2 files changed

+33
-22
lines changed

2 files changed

+33
-22
lines changed

docs/reference/docs/index_.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ using a PUT request. Omit to automatically generate an ID when using a
3434
POST request.
3535

3636

37-
[[docs--api-query-params]]
37+
[[docs-index-api-query-params]]
3838
==== {api-query-parms-title}
3939

4040
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-seq-no]

docs/reference/docs/update.asciidoc

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,28 @@
66

77
Updates a document using the specified script.
88

9+
[[docs-update-api-request]]
10+
==== {api-request-title}
11+
12+
`POST /<index/_update/<_id>`
13+
14+
[[docs-update-api-path-params]]
15+
==== {api-path-parms-title}
16+
17+
`<index>`::
18+
(Required, string) Name of the target index. By default, the index is created
19+
automatically if it doesn't exist. For more information, see <<index-creation>>.
20+
21+
`<_id>`::
22+
(Required, string) Unique identifier for the document to be updated.
923

1024
[[docs-update-api-query-params]]
1125
==== {api-query-parms-title}
1226

27+
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-seq-no]
28+
29+
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-primary-term]
30+
1331
`lang`::
1432
(Optional, string) The script language. Default: `painless`.
1533

@@ -19,46 +37,39 @@ include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-refresh]
1937
(Optional, integer) Specify how many times should the operation be retried when
2038
a conflict occurs. Default: 0.
2139

22-
In between the get and indexing phases of the update, it is possible that
23-
another process might have already updated the same document. By default, the
24-
update will fail with a version conflict exception. The `retry_on_conflict`
25-
parameter controls how many times to retry the update before finally throwing
26-
an exception.
27-
2840
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-refresh]
2941

3042
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-routing]
3143

32-
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-source]
44+
`_source`::
45+
(Optional, list) Set to `false` to disable source retrieval (default: `true`).
46+
You can also specify a comma-separated list of the fields you want to retrieve.
3347

34-
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-source-excludes]
48+
`_source_excludes`::
49+
(Optional, list) Specify the source fields you want to exclude.
3550

36-
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-source-includes]
51+
`_source_includes`::
52+
(Optional, list) Specify the source fields you want to retrieve.
3753

3854
include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
3955

40-
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-seq-no]
41-
42-
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-primary-term]
43-
4456
include::{docdir}/rest-api/common-parms.asciidoc[tag=doc-wait-for-active-shards]
4557

4658

4759
[[update-api-desc]]
4860
==== {api-description-title}
4961

50-
Enables you script document updates. This operation:
62+
Enables you script document updates. The script can update, delete, or skip
63+
modifying the document. The update API also supports passing a partial document,
64+
which is merged into the existing document. To fully replace an existing
65+
document, use the <<docs-index_,`index` API>>.
66+
67+
This operation:
5168

5269
. Gets the document (collocated with the shard) from the index.
5370
. Runs the specified script.
5471
. Indexes the result.
5572

56-
The script can update, delete, or skip modifying the document.
57-
58-
The update API also supports passing a partial document,
59-
which is merged into the existing document. To fully replace an existing
60-
document, use the <<docs-index_,`index` API>> instead.
61-
6273
The document must still be reindexed, but using `update` removes some network
6374
roundtrips and reduces chances of version conflicts between the GET and the
6475
index operation.
@@ -266,7 +277,7 @@ POST test/_update/1
266277

267278
[[upserts]]
268279
[float]
269-
==== Upsert
280+
===== Upsert
270281

271282
If the document does not already exist, the contents of the `upsert` element
272283
are inserted as a new document. If the document exists, the

0 commit comments

Comments
 (0)