Indices PUT Mapping API docs: Remove mapping type user and rephrase first sentence (#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.
This commit is contained in:
Joost Rothweiler 2018-03-13 09:58:47 +01:00 committed by Boaz Leskes
parent b2557b9c11
commit 02a611663a
1 changed files with 2 additions and 14 deletions

View File

@ -1,8 +1,7 @@
[[indices-put-mapping]]
== Put Mapping
The PUT mapping API allows you to add a new type to an existing index, or add new
fields to an existing type:
The PUT mapping API allows you to add fields to an existing index or to change search only settings of existing fields.
[source,js]
--------------------------------------------------
@ -10,15 +9,6 @@ PUT twitter <1>
{}
PUT twitter/_mapping/_doc <2>
{
"properties": {
"name": {
"type": "text"
}
}
}
PUT twitter/_mapping/_doc <3>
{
"properties": {
"email": {
@ -29,8 +19,7 @@ PUT twitter/_mapping/_doc <3>
--------------------------------------------------
// CONSOLE
<1> <<indices-create-index,Creates an index>> called `twitter` without any type mapping.
<2> Uses the PUT mapping API to add a new mapping type called `user`.
<3> Uses the PUT mapping API to add a new field called `email` to the `user` mapping type.
<2> Uses the PUT mapping API to add a new field called `email` to the `_doc` mapping type.
More information on how to define type mappings can be found in the
<<mapping,mapping>> section.
@ -125,4 +114,3 @@ PUT my_index/_mapping/_doc
Each <<mapping-params,mapping parameter>> specifies whether or not its setting
can be updated on an existing field.