From a1a03a184c63201d223c5883f04991a66dfd32b2 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Wed, 23 Jul 2014 16:25:36 +0200 Subject: [PATCH] [DOCS] Fix nested root object indexing documentation Types can no longer be specified when indexing, see: https://github.com/elasticsearch/elasticsearch/pull/4552 --- .../mapping/types/root-object-type.asciidoc | 29 ++++--------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/docs/reference/mapping/types/root-object-type.asciidoc b/docs/reference/mapping/types/root-object-type.asciidoc index c574e377f4f..c0432870bb8 100644 --- a/docs/reference/mapping/types/root-object-type.asciidoc +++ b/docs/reference/mapping/types/root-object-type.asciidoc @@ -1,16 +1,13 @@ [[mapping-root-object-type]] === Root Object Type -The root object mapping is an -<> that -maps the root object (the type itself). On top of all the different -mappings that can be set using the -<>, it -allows for additional, type level mapping definitions. +The root object mapping is an <> that +maps the root object (the type itself). It supports all of the different +mappings that can be set using the <>. -The root object mapping allows to index a JSON document that either -starts with the actual mapping type, or only contains its fields. For -example, the following `tweet` JSON can be indexed: +The root object mapping allows to index a JSON document that only contains its +fields. For example, the following `tweet` JSON can be indexed without +specifying the `tweet` type in the document itself: [source,js] -------------------------------------------------- @@ -19,20 +16,6 @@ example, the following `tweet` JSON can be indexed: } -------------------------------------------------- -But, also the following JSON can be indexed: - -[source,js] --------------------------------------------------- -{ - "tweet" : { - "message" : "This is a tweet!" - } -} --------------------------------------------------- - -Out of the two, it is preferable to use the document *without* the type -explicitly set. - [float] ==== Index / Search Analyzers