12.2 元字段(Meta-Fields) 原文链接 翻译:AbnerGong
每个文档都有与之相关的元数据,比如_index
,结构类型_type
,和_id
元字段。一些元字段的行为可以在结构类型被创建时自定义
身份元字段
_index
:文档所属的索引
_uid
:由_type
和_id
组成的复合域
_type
:文档的结构类型
_id
:文档的ID
文档源元数据
_source
:原始JSON代表文档的主体(body)
_size
:_source
的字节大小,由mapper-size
插件提供
索引元字段
_all
:抓取所有内容的域,用来索引所有其他域的值
_field_names
:文档中包含非空值的所有域
_timestamp
:文档相关的(associaed with)时间戳,由手动或(either…or…)自动生成
_ttl
:一个文档在自动删除前应该生存多久
路由元字段
_parent
:用来在两个结构类型之间创建一个父子关系
_routing
:一个自定义路由值,路由一个文档到一个指定片(particular shard)
其它元字段
_meta
:Application specific metadata