Browse Source

Docs: adds note about using null_value with dynamic templates

Closes #7874
Colin Goodheart-Smithe 11 years ago
parent
commit
c7971fb0f9
1 changed files with 5 additions and 0 deletions
  1. 5 0
      docs/reference/mapping/types/root-object-type.asciidoc

+ 5 - 0
docs/reference/mapping/types/root-object-type.asciidoc

@@ -114,6 +114,11 @@ can be set to `true`. For example:
 Dynamic templates allow to define mapping templates that will be applied
 when dynamic introduction of fields / objects happens.
 
+IMPORTANT: Dynamic field mappings are only added when a field contains
+a concrete value -- not `null` or an empty array. This means that if the `null_value` option 
+is used in a `dynamic_template`, it will only be applied after the first document 
+with a concrete value for the field has been indexed.
+
 For example, we might want to have all fields to be stored by default,
 or all `string` fields to be stored, or have `string` fields to always
 be indexed with multi fields syntax, once analyzed and once not_analyzed.