Skip to content

Commit c59ff00

Browse files
Joostrothweilerbleskes
authored andcommitted
Indices PUT Mapping API docs: Remove mapping type user and rephrase first sentence (elastic#28998)
The current docs on [Indices APIs: PUT Mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html) suggests that a having number of different mapping types per index is still possible in elasticsearch versions > 6.0.0 although they have been [removed](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html). The console code has already been updated accordingly but notes (2) and (3) on the console code still name the `user` mapping type. This PR updates the list with notes after the console code, as well as the first sentence of the docs to avoid confusion. Also, I have removed the second command from the console code as it no longer holds any value if the docs are solely on the `_doc` mapping.
1 parent 3a92555 commit c59ff00

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

docs/reference/indices/put-mapping.asciidoc

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
[[indices-put-mapping]]
22
== Put Mapping
33

4-
The PUT mapping API allows you to add a new type to an existing index, or add new
5-
fields to an existing type:
4+
The PUT mapping API allows you to add fields to an existing index or to change search only settings of existing fields.
65

76
[source,js]
87
--------------------------------------------------
98
PUT twitter <1>
109
{}
1110
1211
PUT twitter/_mapping/_doc <2>
13-
{
14-
"properties": {
15-
"name": {
16-
"type": "text"
17-
}
18-
}
19-
}
20-
21-
PUT twitter/_mapping/_doc <3>
2212
{
2313
"properties": {
2414
"email": {
@@ -29,8 +19,7 @@ PUT twitter/_mapping/_doc <3>
2919
--------------------------------------------------
3020
// CONSOLE
3121
<1> <<indices-create-index,Creates an index>> called `twitter` without any type mapping.
32-
<2> Uses the PUT mapping API to add a new mapping type called `user`.
33-
<3> Uses the PUT mapping API to add a new field called `email` to the `user` mapping type.
22+
<2> Uses the PUT mapping API to add a new field called `email` to the `_doc` mapping type.
3423

3524
More information on how to define type mappings can be found in the
3625
<<mapping,mapping>> section.
@@ -125,4 +114,3 @@ PUT my_index/_mapping/_doc
125114

126115
Each <<mapping-params,mapping parameter>> specifies whether or not its setting
127116
can be updated on an existing field.
128-

0 commit comments

Comments
 (0)