Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 871 Bytes

33_Metadata_ID.asciidoc

File metadata and controls

23 lines (16 loc) · 871 Bytes

元数据:文档标识

文档标识与四个元数据字段相关:

_id

文档的 ID 字符串

_type

文档的类型名

_index

文档所在的索引

_uid

_type_id 连接在一起构造成 type#id

默认情况下, _uid 字段是被存储(可取回)和索引(可搜索)的。 _type 字段被索引但是没有存储, _id_index 字段则既没有被索引也没有被存储,这意味着它们并不是真实存在的。

尽管如此,你仍然可以像真实字段一样查询 _id 字段。Elasticsearch 使用 _uid 字段来派生出 _id 。 虽然你可以修改这些字段的 indexstore 设置,但是基本上不需要这么做。