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 @@ -164,10 +164,18 @@ Privilege to index documents. Also grants access to the update mapping action.
164
164
However, it does not enable a user to update existing documents.
165
165
+
166
166
--
167
- NOTE: When indexing documents with an external `_id` either via the index API or
168
- the bulk API, the request must use `op_type` as `create`. If `_id`s are
169
- generated automatically, the authorization happens as if the `op_type` is set to
170
- `create`.
167
+ [NOTE]
168
+ ====
169
+
170
+ This privilege relies on the `op_type` of indexing requests (<<docs-index_>> and
171
+ <<docs-bulk>>). When ingesting documents as a user who has the `create_doc`
172
+ privilege (and no higher privilege such as `index` or `write`), you must ensure that
173
+ 'op_type' is set to 'create' through one of the following:
174
+
175
+ * Explicitly setting the `op_type` in the index or bulk APIs
176
+ * Using the `_create` endpoint for the index API
177
+ * Creating a document with an auto-generated `_id`
178
+ ====
171
179
172
180
--
173
181
You can’t perform that action at this time.
0 commit comments