From c2e38fbf782b95208f89fb3337485cdfe913ecb1 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Wed, 26 Mar 2014 11:51:19 -0400 Subject: [PATCH] [DOCS] Clarify nested type documentation --- docs/reference/mapping/types/nested-type.asciidoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/reference/mapping/types/nested-type.asciidoc b/docs/reference/mapping/types/nested-type.asciidoc index 17d8a134618..8285a444f39 100644 --- a/docs/reference/mapping/types/nested-type.asciidoc +++ b/docs/reference/mapping/types/nested-type.asciidoc @@ -37,7 +37,11 @@ instance ones), for example: "type1" : { "properties" : { "obj1" : { - "type" : "nested" + "type" : "nested", + "properties": { + "name" : {"type": "string", "index": "not_analyzed"}, + "count" : {"type": "integer"} + } } } } @@ -46,7 +50,8 @@ instance ones), for example: The above will cause all `obj1` to be indexed as a nested doc. The mapping is similar in nature to setting `type` to `object`, except that -it's `nested`. +it's `nested`. Nested object fields can be defined explicitly as in the +example above or added dynamically in the same way as for the root object. Note: changing an object type to nested type requires reindexing.