Conversation
Allowing `_doc` as a type will enable users to make the transition to 7.0 smoother since the index APIs will be `PUT index/_doc/id` and `POST index/_doc`. This also moves most of the documentation to `_doc` as a type name. Closes elastic#27750 Closes elastic#27751
clintongormley
left a comment
There was a problem hiding this comment.
I couldn't check all 196(!) files, but it looks like you've got most things, thank you.
Added some comments about the removal of types page.
| } | ||
| }, | ||
| "tweet": { | ||
| "_doc": { |
There was a problem hiding this comment.
this one shouldn't change
| @@ -187,7 +187,7 @@ PUT twitter/doc/user-kimchy | |||
|
|
|||
There was a problem hiding this comment.
doc in lines 167 and 180 could become _doc
There was a problem hiding this comment.
Line 167 still needs changing
| PUT twitter/doc/tweet-1 | ||
| { | ||
| "type": "tweet", <1> | ||
| "type": "_doc", <1> |
There was a problem hiding this comment.
this one shouldn't change
| "filter": { | ||
| "match": { | ||
| "type": "tweet" <1> | ||
| "type": "_doc" <1> |
There was a problem hiding this comment.
this one shouldn't change
| @@ -320,7 +320,7 @@ PUT tweets | |||
| "index.mapping.single_type": true | |||
| }, | |||
| "mappings": { | |||
There was a problem hiding this comment.
In line 242 above, under changes coming in 6.x, mention addition of _doc as an acceptable type name to ease the transition to new URLs
| "source": { | ||
| "index": "twitter", | ||
| "type": "tweet" | ||
| "type": "_doc" |
There was a problem hiding this comment.
this is the source, so the type name should remain
| "index": "twitter", | ||
| "type": "tweet" | ||
| "type": "_doc" | ||
| }, |
There was a problem hiding this comment.
in lines 375 and 413 below, use _doc instead of doc
|
@clintongormley done |
clintongormley
left a comment
There was a problem hiding this comment.
One missed change and a couple of suggestions, otherwise LGTM
| @@ -187,7 +187,7 @@ PUT twitter/doc/user-kimchy | |||
|
|
|||
There was a problem hiding this comment.
Line 167 still needs changing
| can be used for the type, but there can be only one. | ||
| can be used for the type, but there can be only one. The preferred type name | ||
| is `_doc`, so that index APIs have the same path as they will have in 7.0: | ||
| `PUT index/_doc/id` and `POST index/_doc` |
There was a problem hiding this comment.
perhaps PUT {index}/_doc/{id} instead?
| a document no longer requires a document `type`. | ||
| a document no longer requires a document `type`. The new index APIs | ||
| are `PUT index/_doc/id` in case of explicit ids and `POST index/_doc` | ||
| for auto-generated ids. |
There was a problem hiding this comment.
same here. perhaps PUT {index}/_doc/{id} instead?
The test assumes that all 6.x indices support `_doc` as a type name but support for it was actually only added in 6.2 via elastic#27816.
The test assumed that it could run against all 6.x indices but it actually requires 6.2+ since 6.2 is the first version that allowed `_doc` as a type name (elastic#27816). Closes elastic#38202
Allowing
_docas a type will enable users to make the transition to 7.0smoother since the index APIs will be
PUT index/_doc/idandPOST index/_doc.This also moves same tests and most of the documentation to
_docas a type name.Closes #27750
Closes #27751