Skip to content

Commit 3965730

Browse files
committed
Clarify _doc is a permanent part of certain document APIs. (#41727)
We received some feedback that it is not completely clear why `_doc` is present in the typeless document APIs: > The new index APIs are PUT {index}/_doc/{id} in case of explicit ids and POST {index}/_doc for auto-generated ids."_ Isn't this contradicting? Specifying *types in requests is deprecated*, but we are supposed to still mention *_doc* in write requests? This PR updates the 'removal of types' documentation to try to clarify that `_doc` now represents the endpoint name, as opposed to a type.
1 parent 2161323 commit 3965730

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/reference/mapping/removal_of_types.asciidoc

+6-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ Elasticsearch 7.x::
270270
* Specifying types in requests is deprecated. For instance, indexing a
271271
document no longer requires a document `type`. The new index APIs
272272
are `PUT {index}/_doc/{id}` in case of explicit ids and `POST {index}/_doc`
273-
for auto-generated ids.
273+
for auto-generated ids. Note that in 7.0, `_doc` is a permanent part of the
274+
path, and represents the endpoint name rather than the document type.
274275

275276
* The `include_type_name` parameter in the index creation, index template,
276277
and mapping APIs will default to `false`. Setting the parameter at all will
@@ -554,6 +555,10 @@ GET index/_doc/1
554555
// CONSOLE
555556
// TEST[continued]
556557

558+
NOTE: In 7.0, `_doc` represents the endpoint name instead of the document type.
559+
The `_doc` component is a permanent part of the path for the document `index`,
560+
`get`, and `delete` APIs going forward, and will not be removed in 8.0.
561+
557562
For API paths that contain both a type and endpoint name like `_update`,
558563
in 7.0 the endpoint will immediately follow the index name:
559564

0 commit comments

Comments
 (0)