elasticsearch. guide

Meta

mapping元数据

Each mapping can have custom meta data associated with it. These are simple storage elements that are simply persisted along with the mapping and can be retrieved when fetching the mapping definition. The meta is defined under the _meta element, for example:

每个mapping里面都可以包含你的自定义的metadata(元数据),这些信息简单的以一个元素的方式存储在es的mapping里面,同样通过mapping的获取接口,你可以再次拿回这些meta data信息,这些元数据信息定义在 _meta 元素下面,例如:

{
    "tweet" : {
        "_meta" : {
            "attr1" : "value1",
            "attr2" : {
                "attr3" : "value3"
            }
        }
    }
}

Meta can be handy for example for client libraries that perform serialization and deserialization to store its meta model (for example, the class the document maps to).

Meta可以很方便的被客户端序列化和反序列化,用来存储其元模型(Meta Model)。

 
Fork me on GitHub