File tree 2 files changed +14
-5
lines changed
x-pack/docs/en/security/authorization
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ include::{docdir}/rest-api/common-parms.asciidoc[tag=if_primary_term]
45
45
(Optional, enum) Set to `create` to only index the document
46
46
if it does not already exist (_put if absent_). If a document with the specified
47
47
`_id` already exists, the indexing operation will fail. Same as using the
48
- `<index>/_create` endpoint. Valid values: `index`, `create`. Default: `index`.
48
+ `<index>/_create` endpoint. Valid values: `index`, `create`.
49
+ If document id is specified, it defaults to `index`. Otherwise, it defaults to `create`.
49
50
50
51
include::{docdir}/rest-api/common-parms.asciidoc[tag=pipeline]
51
52
Original file line number Diff line number Diff line change @@ -171,10 +171,18 @@ Privilege to index documents. Also grants access to the update mapping action.
171
171
However, it does not enable a user to update existing documents.
172
172
+
173
173
--
174
- NOTE: When indexing documents with an external `_id` either via the index API or
175
- the bulk API, the request must use `op_type` as `create`. If `_id`s are
176
- generated automatically, the authorization happens as if the `op_type` is set to
177
- `create`.
174
+ [NOTE]
175
+ ====
176
+
177
+ This privilege relies on the `op_type` of indexing requests (<<docs-index_>> and
178
+ <<docs-bulk>>). When ingesting documents as a user who has the `create_doc`
179
+ privilege (and no higher privilege such as `index` or `write`), you must ensure that
180
+ 'op_type' is set to 'create' through one of the following:
181
+
182
+ * Explicitly setting the `op_type` in the index or bulk APIs
183
+ * Using the `_create` endpoint for the index API
184
+ * Creating a document with an auto-generated `_id`
185
+ ====
178
186
179
187
--
180
188
You can’t perform that action at this time.
0 commit comments