浏览代码

Docs: adds note about using null_value with dynamic templates

Closes #7874
Colin Goodheart-Smithe 11 年之前
父节点
当前提交
c7971fb0f9
共有 1 个文件被更改,包括 5 次插入0 次删除
  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
 Dynamic templates allow to define mapping templates that will be applied
 when dynamic introduction of fields / objects happens.
 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,
 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
 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.
 be indexed with multi fields syntax, once analyzed and once not_analyzed.